![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() |
The input line is treated like all other input, i.e. text outside quotes and within single quotes is converted to upper case.
This format is only offered for completeness - the TERMINAL input format is probably more useful.
The input line is treated like all other input, i.e. text outside quotes and within single quotes is converted to upper case.
This is probably the most useful format since it permits obtaining user input while a file is being read.
The resulting value can have any of the data types known by Garfield, (Number, String, Logical, Histogram or Undefined), but the result is not of much use in the case of histograms since histograms that are formatted to a string become just the word 'Histogram'.
The expression may contain global variables if desired.
A template can contain the following elements:
Element | Purpose |
---|---|
`string`
| Locate string in the input, resume from there |
var
| Global variable to which the field is assigned |
.
| Ignore the corresponding input field. |
Notes:
Examples:
Input | Template | Result |
---|---|---|
1 2 3
| x y z
| x=1, y=2, z=3 |
1 2 x+1
| x y z
| x=1, y=2, z=2 |
1 2 3 4
| x y .
| x=1, y=2 |
1 2
| x y z
| x=1, y=2, z not defined |
1 2 3
| x y
| Error: y := 2 3 is incorrect syntax |
1 2 A 3
| x . 'A' y
| x=1 y=3 |
1 2 A 3
| x 'A' y
| Error: x := 1 2 is incorrect syntax |
1 `abc` 2
| x y .
| x=1 y=`abc` |
1>2
| z .
| z=False |
Formatted on 0100-09-02 at 06:57.