Comments in DM32 program listings
|
06-05-2023, 09:24 PM
Post: #1
|
|||
|
|||
Comments in DM32 program listings
The DM32 documentation doesn't mention it yet, but comments can be included within program listings in a way very similar to HP's RPL program comments. The comments can only exist in the "source code", created on a computer as a plain text file.
In brief, everything in a program line after (and including) a "#" character is considered to be a comment, and is automatically deleted when the program is loaded into RAM. EXAMPLE: Suppose that the following is the program section of a state file: Code: # PROGRAM When loaded into RAM from flash memory, this becomes the following program: Code: A01 LBL A Note: Unlike in RPL, there is no way to turn off comment mode within a program line. For example, EQN 1 + 2 # + 3 # + 4 is loaded into program memory as the equation 1+2, not 1+2+4. Everything between the first "#" and the end of the line is discarded. <0|ɸ|0> -Joe- |
|||
06-11-2023, 05:27 AM
Post: #2
|
|||
|
|||
RE: Comments in DM32 program listings
Thank you for discovering this.
I don't possess one yet, so I lack knowledge. If stored program is brought back to RAM, comments are lost. But comments take no memory. If they do not exist to memory, there is nothing to store. Then they should be assigned memory, to be saved. Perhaps SM can work on this in an update. Regards - RR |
|||
06-11-2023, 12:32 PM
Post: #3
|
|||
|
|||
RE: Comments in DM32 program listings
(06-11-2023 05:27 AM)Rolief_Rechner Wrote: Thank you for discovering this. Just in case I was not clear, the comments are saved, in the "state" file, which is stored in the DM32's flash memory. When that state file is loaded into RAM, the comments are stripped away, because they are not needed there. But they remain intact in the state file, where programmers can read them on their PC's. Bottom line: the comments are not lost, but they take no RAM space... a win/win situation. <0|ɸ|0> -Joe- |
|||
06-11-2023, 12:40 PM
Post: #4
|
|||
|
|||
RE: Comments in DM32 program listings
(06-11-2023 12:32 PM)Joe Horn Wrote:(06-11-2023 05:27 AM)Rolief_Rechner Wrote: Thank you for discovering this. One small point of clarification - if you make any changes to the State File, and save the changed file, all comments would be lost in that copy, but of course you still have the original file with comments intact on your PC where it was created. --Bob Prosperi |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)