|
Messages to the user and program comments need a way to input text into programs.
RPN-25 CE lets you enter the desired text as follows:
1. Select the command requiring a text argument, for example MSG text.
2. Tap on the word TEXT at the bottom:
3. A screen will open, allowing you to enter or modify text.
• The character counter will turn red when the maximum text length has been reached.
• The text may be left- or right-adjusted, or centered. Comments (//) are always left-adjusted.
4. Tap Save to return to the previous screen.
5. Tap Insert to add the command, or Replace to modify the current command.
Showing register content in a message
A message may show the value stored in a register. The format is the same as in the display.
Multiple registers may be displayed in the same message, limited by space only.
Up to two digits following the character # are taken as the number of a register whose content will be shown in the message.
If # is immediately followed by i, indirect addressing is applied, i.e. the content of the register is used as the register number to be read.
If # is immediately followed by I (capital-i), the register content is shown as a positive integer without decimals.
Showing stack content in a message
A message may show the value stored in a stack register or in Last x. The format is the same as in the display.
Multiple stack values may be displayed in the same message, limited by space only.
The desired stack register is defined by the character following # : X, Y, Z, T, or L (case-insensitive)
If # is immediately followed by i, indirect addressing is applied, i.e. the content of the stack register is used as the register number to be read.
If # is immediately followed by I (capital-i), the stack register content is shown as a positive integer without decimals.
Indirect register addresses are converted to positive integer values before being used. If not in range 0..99, R?? will be displayed.
Sequences of multiple # characters are treated as a single #.
MSG Text Examples:
(Display set to FIX 0)
Result #25 would show the message "Result 12345" (if R25 contains 12345)
Result #05 would show the message "Result 111" (if R5 contains 111)
Result #5x would show the message "Result 111x" (if R5 contains 111)
Result #x5 would show the message "Result 125" (if X contains 12)
Result #.5 or Result #15 would show the message "Result 1515" (if R15 contains 1515)
Result #i0 would show the message "Result 9999" (if R0 contains 90 and R90 contains 9999)
Stack Z: #Z would show the message "Stack Z: 2022" (if Z contains 2022)
Reg iZ (#z): #iZ would show the message "Reg iZ (77): 2022" (if Z contains 77 and R77 contains 2022)
(Display set to FIX 2):
With R8 = 25.030, R25 = 3.14, R26 = 2.17, a loop containing RI#8 value = #i8, would show the message "R25 value = 3.14".
After executing the loop instruction ISG 8, the message would change to "R26 value = 2.17"
and so on up to and including R30, after which the loop ends.
NOTES
1. Messages may be tested by performing the steps above in RUN mode.
2. Message commands may be copied/pasted in PRGM mode.
3. Comments placed between keys of a constant will be removed on creating a number literal.
4. Messages should not begin or end with the character §, which is used for text-alignment internally.
Some SAMPLE PROGRAMS using messages:
– _Demo 25•
– 41-Conics•
– 41-Polynomials
– 41-Palindromic Polynomials•
– 41-Sudoku Solver
| |