Scalar System Variables

From NARS2000
Revision as of 03:00, 8 May 2008 by Sudleyplace (talk | contribs) (New page: <p>The Scalar System Variables (<apll>⎕CT</apll>, <apll>⎕IO</apll>, <apll>⎕PP</apll>, <apll>⎕PW</apll>, and <apll>⎕RL</apll>) when assigned to (<apll>⎕PP←R</apll>), have two ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Scalar System Variables (⎕CT, ⎕IO, ⎕PP, ⎕PW, and ⎕RL) when assigned to (⎕PP←R), have two properties beyond the ones in their description in the Extended APL Standard.

  • If a number to be assigned to any of the scalar system variables is out of the normal range for that variable, it is automatically range-limited, meaning if the number is too high, the highest valid number is used, and if it is too low, the lowest valid number is used. This way, you don't need to know the limits of a scalar system variable, and won't signal a DOMAIN ERROR by using a value out of range.

    For example,

         ⎕PP←33.3
         ⎕PP
    17
         ⎕CT←¯2
         ⎕CT
    0

  • If an empty simple vector is assigned to any of the scalar system variables, the default system value is used instead. This way, you can restore the default value without knowing its value.

    For example,

         ⎕PP←⍬
         ⎕PP
    10
         ⎕CT←''
         ⎕CT
    3.0E¯15