Variables — gull system handbook
Variables in step 3 Rules: creating one, a rule or a constant, reading it in other rules, Extract variable, naming rules and circular references.
Variables
A variable is a named rule or a fixed value that other rules read by name. Write an intermediate result once and use it in ten rules.
Create a variable
- In step 3 switch the view on the line above the tree from Rules to Variables and click New variable.
- In Properties give it a Name and write the formula in the Rule group — say `[Length] - 2 * [Thickness]` — or a fixed value: `1.2`, `"Stainless"`.
- Read it in another rule by name: `[Inner length] / 2`. The same works in folder-name formulas and in form field rules.
The quicker way: in any rule select part of the formula, right-click and choose Extract variable (Ctrl+E). The selection is replaced by a reference to the new variable.
Naming rules
- Not empty, and no `[`, `]`, quotes or line breaks.
- Not a word of the language: `TRUE`, `FALSE`, `AND`, `OR`.
- Not the name of an input, a constant or a table — rules read all of them by the same bare name.
What a variable sees
Constants
The old Constants are now variables with a fixed value. The full rule editor still shows a Constants heading for them; create new ones as variables.