Number Literals (Constants)


Normally, constants in programs are entered by pressing the appropriate digit keys, along with decimal point, EEX, CHS as required by the value.
This may take many steps in most cases. In addition, the numbers aren't easy to read.

RPN-25 CE allows you to convert such a sequence into a single program step:

1. Double-tap the digit that defines the start of the sequence, here the 1 in step 01:


2. The step will collapse into a single number literal:


3. Suppose the number should be 14.92 instead.
    Double-tap the literal and add the decimal point.
    (Tap "4" – Save – press DP key – tap display)


4. Double-tap the first digit again:



NOTES
1. Constants may be copied/pasted in the calculator view.
2. They may originate from any text source.

 
 

 

 Text – MSG / MSGP / MSGS / Comments


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

 
 

 

 Flag 41


A large number of HP-41 CX programs will run with little or no changes on RPN-25 CE.

Flag 41 is designed to make the transition even easier in some cases.

If set, an indicator appears in the display:


Setting flag 41 has the following effects:

Flag 22 takes the role of flag 3 in normal mode:
  It is set on numeric input by the user.
  It is reset on RTN (by the user), f PRGM, GTO 00, or by testing (FS?22).

Flags 2 and 3 behave like ordinary flags (not auto-cleared on test anymore)

Flag 42 reflects the GRD setting, Flag 43 the RAD setting
  Both flags off signifies DEG mode.
  Only one of them can be set at any time.

Flag 49 is set in a low-battery situation

Flags 24 and 25 may be used to control error situations:
  If F24 is set, an overflow result will not halt program execution.
  Instead, the "error value" ±9.999999999E99 is considered an acceptable value and program execution continues.
  If F25 is set, any error situation is ignored just once. If an error occurrs, F25 is cleared and the program continues.

• Even with F24 cleared, ∑+ and ∑- do not halt a program when a register overflows, storing the maximum value instead.

• The instructions ∑+ and ∑- store values at the statistics registers defined by the HP-41, not the HP-25 (see here).

• Behavior of CLRGX, REGCOPY, REGSWAP, REGSORT:
  These commands act on an argument of the form ss.ddnn
  where ss and dd designate 2-digit register numbers, and nn is a count value or the sort order.

  Programs on the HP-41 use 3-digit numbers instead: sss.dddnnn
  With F41 set, RPN-25 will interpret all arguments as 0ss.0dd0nn, simplifying the migration process.

• F41 may be saved by executing ST41, restored by executing RC41.
  Useful in subroutines where F41 must be temporarily modified.

• F41 is not cleared by the command CFLAGS.

All flags, including F41, are cleared by powering the calculator off.

 
 

 

 iPhone Tip

Does the RPN calculator on your iPhone look…

…like this?

…rather than this?

 
If so: On your iPhone, go to Settings —> Display & Brightness —> Display Zoom
Make sure Display Zoom is set to Default
 


Copyright © 2024. All rights reserved.
Apple and the Apple logo are trademarks of Apple Inc., registered in the U.S. and other countries. iPad is a trademark of Apple Inc.