Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : structured programming using cmm2 load and cmm2 run
Author | Message | ||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 222 |
On page 101 of the user manual there are commands "CMM2 LOAD" and "CMM2 RUN" described which allow the use of CMM2 *.inc files on a pico. I like that feature very much, but the files in RAM look a little "flat" and have funny Comment ticks ' on each line. Example: part of a code of a larger .inc file Option BASE 1' Function SUM(A%,B%)As INTEGER' If B% <A% Then' Print "error in function sum(a%,b%): b% < a%"' End ' Else ' SUM =(B%-A%+1)*(A%+B%)/2' End If ' End Function ' Normaly I indent to show the program structure - so it looks a little ugly in my eyes. Is it a must have or is some pretty printing possible? -andreas Edited 2024-12-17 05:28 by andreas |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1301 |
Hi Andreas, could that be the reason? The Manual says: Regards Michael causality ≠ correlation ≠ coincidence |
||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 222 |
Hi Michael, yes - for sure I read this but had some hope that a guru has possibilities... At least one can load and run programs that use #include but this way it is not very good usable for development. -andreas |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6904 |
[GUESSWORK] The files look partially crunched. Probably because the file in flash will be treated similarly so that #Include and #Define can be used. I doubt if there's a way round it as it will all have to be in the same format prior to tokenisation (if that happens). As the manual says, you can't get the source file back as - at a minimum - all unnecessary spaces and comments are stripped out. [/GUESSWORK] Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1301 |
Hi Andreas, ach so! (oh I see!) I think that the design doesn't intend for this to be edited with the internal editor. Regards Michael causality ≠ correlation ≠ coincidence |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9283 |
If you want to work like this it is easy as long as you discipline yourself ALWAYS Use EDIT fname$ use CMM2 RUN fname$ Never Use LOAD Use EDIT Probably avoid CMM2 LOAD RUN |
||||
Print this page |