Post Reply 
Comments in RPL?
09-08-2014, 06:14 PM
Post: #1
Comments in RPL?
Is there a comment delimiter defined for RPL so that comments can be embedded when editing on the PC?

- John
Find all posts by this user
Quote this message in a reply
09-08-2014, 06:45 PM
Post: #2
RE: Comments in RPL?
(09-08-2014 06:14 PM)John R. Graham Wrote:  Is there a comment delimiter defined for RPL so that comments can be embedded when editing on the PC?

- John

I believe the @ symbol is will serve the purpose:

<<
@ this is a comment line
DUP DROP
>>

On the calculator, the comments will be removed, if I recall correctly.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
09-08-2014, 07:42 PM (This post was last modified: 09-08-2014 07:47 PM by C.Ret.)
Post: #3
RE: Comments in RPL?
Hi,

On my HP-28S, I use to copy my programs in a paper notebook.
Comments are easy to insert as well as a description of the arguments to use and in which order to put them in the stack.

On the calculator, program readability is poor on the HP-28S screen.

But if I may have to insert comment directly into a program, I will use a string followed by a DROP command.

For example:

Code:
« "* INPUT  1: n     natural number to be tested" DROP
  DUP 0              "Initialize MAX & TOF      " DROP
  WHILE
    ROT DUP 1 >      "Loop until last term      " DROP
  REPEAT
    IF 2 / DUP FP    "Compute next term of seq. " DROP
    THEN 6 * 1 + END "Even:Half  Odd: Triple + 1" DROP
    ROT OVER MAX     "Reset MAX value           " DROP
    ROT 1 +          "Increment TOF             " DROP
  END
  DROP               "Remove last term of seq.  " DROP
  "** OUTPUT  2: MAX altitude  1: Time Of Flight" DROP
»
Find all posts by this user
Quote this message in a reply
09-08-2014, 11:30 PM
Post: #4
RE: Comments in RPL?
(09-08-2014 07:42 PM)C.Ret Wrote:  But if I may have to insert comment directly into a program, I will use a string followed by a DROP command.

Clever!
Thanks

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




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