PAR: give a name a value
A PAR line declares a name and gives it a value, so that coordinates later in the program can be worked out rather than written down. A parametric program states the panel length once and derives every edge from it, which is how one file cuts a range of sizes. The value may itself be a sum of numbers and names declared earlier.
Syntax
PAR <name> <value or sum>VerifiedReproduced byte for byte from a machine-proven file.
Parameters
name | The name being given a value, used as a coordinate anywhere after it. | required |
value | A number, or a sum of numbers and names declared earlier. | required |
How it is written to PGM
PAR produces no bytes. The converter works every sum out while reading and writes the resulting numbers, so the converted file is fixed at the size the names gave and no longer carries the names themselves.
Example
PAR LEN 800Notes
- Only the spelling with an equals sign can carry a sum. X=LEN/2 is worked out; XLEN would be a letter and a name run together with no telling where one ends, so it is read as a plain number and refused.
- Sums use the four arithmetic operations and brackets. Nothing is executed: the value is read character by character, never handed to a program.
- Panel dimensions may be computed too, which is usually the value most worth declaring.
- Xilog Plus also has L. It is left alone until a real program shows what one looks like, because guessing could read a label as a declaration.
Messages this command can produce
- PAR without a valueParse error
- A name a value cannot be given toParse error
- A name that was never given a valueParse error
- A value that divides by zeroParse error
- A bracket left openParse error
- Something left over after the valueParse error
- A value that stops in the middleParse error
- A character that means nothing in a valueParse error
- Brackets nested too deeplyParse error
- Values worked out from declared namesNotice