Manual - Programming Up
 Contents   News   View 

Assignment Previous Next

Assignment

Start Quantum again and reproduce what you see in the Quantum session below.

Use special functions Decf, Incf, Pop, Push, PushNew, and Setq to assign or change values to "places".  A "place" can be:

symbol   a Symbol
(Elt array i)   an element of a 1-dimensional Array
(Elt array [i_1 ...  i_n])   an element of an n-dimensional Array
(XXXXX struct)   a field of a Struct
[place_1 ...  place_n]   an Array of places

Assignment to an Array of places occurs in parallel (simultaneously, not sequentially).  You can use (Setq [x y] [y x]) to switch the values of Symbol's x and y , etc.

Use vanilla function SetSymbolValue to set a Symbol's global value.



©2004-2021 Planet Quantum Kelly Roach