Scalar objects are treated as shorthands for array objects with just one element
In the book on page 383 the following is stated:
Scalar objects are treated as shorthands for array objects with just one element.
This means that references to scalar objects can always be suffixed with [0] without a complaint from the SPIN parser.In the program below such is tested.
EpiSpin gives an error message here whereas Spin doesn’t.byte x;
init{
Submitted by Kees Pronk on 20 December 2011 at 22:15skip; x = 3; x = x; x = x[0]; // EpiSpin error here }
Log in to post comments