06-05-2023, 09:24 PM
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:
When loaded into RAM from flash memory, this becomes the following program:
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.
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
PTR: 2
PGM
LBL A # program line 1
STO X # program line 2
# comments occupy ZERO memory space
# comment lines are not loaded at all
STO Y # program line 3 (not 5)
PGMEND
When loaded into RAM from flash memory, this becomes the following program:
Code:
A01 LBL A
A02 STO X
A03 STO Y
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.