![]() |
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: 226 |
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: 1576 |
Hi Andreas, could that be the reason? The Manual says: Regards Michael causality ≠ correlation ≠ coincidence |
||||
andreas![]() Senior Member ![]() Joined: 07/12/2020 Location: GermanyPosts: 226 |
Hi Michael, yes - for sure ![]() 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: 7871 |
[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: 1576 |
![]() 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: 10246 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |