Types
There are a number of basic variable types, listed below. The type of a variable in a command or function is always cued by the name given in the command/function signature, which will either be (e.g, b for a boolean type) or start with (e.g., fposx for a float type) the first letter of the type’s name. Multiple instances of the same type in a command signature or FISH function are most often numbered (i1 i2 i3 … and so on).[1]
- any
A catch-all for any (a) of the other types, excepting sym, shown here. Multiple instances in a command are numbered (a1 a2 a3 etc.). This type is also indicated when a specific combination of types is acceptable (for instance, the common case where a string s or an integer i may be supplied). When this is the case, the specific acceptable types are indicated in the explanatory text.
- bool
A Boolean value (b), with six valid expressions: on off true false yes no. If no value is found, a Boolean is assumed to be true. No value, on, true, and yes are all equivalent. off, false, and no are all equivalent. Multiple instances in a command are numbered (b1 b2 b3 etc.).
- flt
A real number (f), positive or negative. It may be written in scientific e notation. Multiple instances in a command are numbered (f1 f2 f3 etc.).
- ind
An index (ind), positive integer. Multiple instances in a command are numbered (ind1 ind2 ind3 etc.).
- int
An integer (i), positive or negative. An integer cannot contain a decimal. Multiple instances in a command are numbered (i1 i2 i3 etc.).
- list
A list (l), which is a changeable, ordered sequence of elements or items. Lists items are accessed by index. See Lists for more information.
- num
A number (n), for which either a flt or an int is valid. Multiple instances in a command are numbered (n1 n2 n3 etc.).
- str
A string (s) of alphanumeric characters. Multiple instances in a command are numbered (s1 s2 s3 etc.). See Strings for more information.
- vec
A vector (v or v2 or v3) expressed as a matrix with one row. v2 and v3 denote that a 2D or 3D vector, respectively, is required. A plain “v” indicates that a vector of the same dimensionality as the code is required, that is, a 3D vector is required if the code is a 3D code, and a 2D vector is required if the code is a 2D code. In FLAC3D, v always indicates a 3D vector. When more than one vector of the same type in is required in a command these are distinguished with underscore-appended letters (v2_a v2_b or v_a v_b, etc.). See Vectors for more information.
- vec2
A 2D vector.
Endnotes
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Dec 19, 2024 |