Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕CS Compatibility Setting
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕CS Compatibility Setting


The system variable ⎕CS (Compatibility Setting) can be used to ensure that applications written under APL.68000 Level I work in the same way under APLX. It can be set to a number in the range 0 to 7. It is normally set to 0, but if a Level I workspace is loaded it will automatically be set to 7. The behaviour affected by ⎕CS is as follows:

       ⎕CS←1                         Expressions  of  the  form   5 6  7[2]  will
                                     be   allowed  rather   than    giving   RANK
                                     ERROR.
       ⎕CS←2                         ⎕NC  and  ⎕NL  will use the  code  4  rather
                                     than ¯1 to indicate an invalid name.
       ⎕CS←4                         Default  formatting  of numeric arrays  uses
                                     the same width for all columns,  rather than
                                     determining  the  width separately for  each
                                     column.

The three parameters can be set in any combination by adding together the codes. For example:

             ⎕CS←0
             1 3 5[2]
       RANK ERROR
             1 3 5[2]
                  ^
             2 3⍴1 2 3 1 100 1000    (Each column has its own format)
       1   2    3
       1 100 1000
             ⎕CS←5                   (Set codes 1 and 4)
             1 3 5[2]
       3
             2 3⍴1 2 3 1 100 1000    (All columns share the same format)
           1    2    3
           1  100 1000

Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕CS Compatibility Setting
[ Previous | Next | Contents | Index | APL Home ]