Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:03 23 Dec 2024 Privacy Policy
Jump to

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: Germany
Posts: 222
Posted: 07:26pm 16 Dec 2024
Copy link to clipboard 
Print this post

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: Germany
Posts: 1301
Posted: 10:56pm 16 Dec 2024
Copy link to clipboard 
Print this post

  andreas said  On page 101 of the user manual there are commands "CMM2 LOAD" and "CMM2 RUN" described ...

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

Hi Andreas, could that be the reason? The Manual says:
  Quote  It is important to note that if used all editing of programs
must be offline or direct to and from disk as the source files cannot be
reconstructed from the version loaded by these commands.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 222
Posted: 07:27am 17 Dec 2024
Copy link to clipboard 
Print this post

  twofingers said  
  andreas said  On page 101 of the user manual there are commands "CMM2 LOAD" and "CMM2 RUN" described ...

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

Hi Andreas, could that be the reason? The Manual says:
  Quote  It is important to note that if used all editing of programs
must be offline or direct to and from disk as the source files cannot be
reconstructed from the version loaded by these commands.

Regards
Michael


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 Kingdom
Posts: 6904
Posted: 08:14am 17 Dec 2024
Copy link to clipboard 
Print this post

[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: Germany
Posts: 1301
Posted: 11:37am 17 Dec 2024
Copy link to clipboard 
Print this post

  andreas said  ... yes - for sure   I read this but had some hope that a guru has possibilities ...

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 Kingdom
Posts: 9283
Posted: 12:44pm 17 Dec 2024
Copy link to clipboard 
Print this post

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


To reply to this topic, you need to log in.

© JAQ Software 2024