Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕SVC Shared Variable Control
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕SVC Shared Variable Control


This system function is used to control access to a shared variable by the two processors sharing it, or to monitor the access control vector.

One-argument form

The right argument is a character matrix of names, or a vector containing one name. The result is the effective value of the 'control vector' for each name. The 'control vector' is a 4 element boolean. A 1 in the 'control vector' has the following effects:

Position    Effect
     1      You cannot set a new value for the shared variable until the other
            processor has set or used the variable
     2      The other processor cannot set a new value for the shared variable
            until you have set or accessed it
     3      You cannot use the value of the shared variable until it is set by
            the other processor
     4      The other processor cannot use the shared variable until you set it

The default setting for APLX is 1 1 1 1.

Two-argument form

The right argument is as above, but the left argument is a 4 column boolean matrix (or vector, for a vector right argument) which contains the proposed new values for the 'control vector'. A vector left argument is applied to all names in the right argument. The proposed new values are 'OR-ed' with the most recent values set by the other processor. The result is the new 'control vector' for the variables named. If the name is that of a variable that is not shared, the 'control vector' remains at 0 0 0 0.


Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕SVC Shared Variable Control
[ Previous | Next | Contents | Index | APL Home ]