Post Reply 
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
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.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Comments in DM32 program listings - Joe Horn - 06-05-2023 09:24 PM



User(s) browsing this thread: 1 Guest(s)