Saving, Restoring, and Modifying Mode Settings

Often, programs are designed to run in a specific mode (for example, FIX 4 or RPN). You can use L:uto recall the current mode, save it, modify the settings, either by going in the menu, or using the $:ufunction and then restoring it. For example:

1.L:u$1recalls and stores the current mode settings in Memory 1.

2.:u4IOselects FIX=4.

3.Your program: L1:$:urestores the mode settings to what they were at the beginning of the program.

4.Lureturns a 12 digit number: CactdmrvAOff. See Table 13-4 for a description of each digit.

Table 13-4

Digit Description

Ais “1” for radian mode, “2” for degree mode.

ais “1” in Semi-annual mode, “2” in Annual mode.

Cis “1” in Standard TVM mode, “2” in Canadian TVM mode.

c is “1” in Actual day count mode, “2” in 360 day count mode.

d is “1” if the decimal separator is “.”, 2 for “,”

ff is “00” to “11” or “13” and indicates the FIX setting (13 is for FIX=-1).

m is “1” for “mm.ddyyyy” mode, “2” for “dd.mmyyyy” mode.

O is “1” for Chain mode, “2” for Algebraic mode, and “3” for RPN mode.

rdefines the regression line type. “1” for a*x+b, “2” for a*ln(x)+b, “3” for b*e(ax), “4” for b*xa, “5” for b*ax, “6” for a/x+b and “7” for ax2+bx+c.

tis “1” if thousands separators are not visible, “2” if they are visible.

vis “1” for 2 variable statistics, “2” for 1 variable, and “3” for 1 variable frequency.

When using :$:u, any illegal value is ignored and this setting will not change. For example:

314:$:uwill switch to RPN mode. No other setting will change.

86 Programming