Next: , Previous: Modules, Up: Reference


5.4 Data Types

5.4.1 Numbers

Numbers in FOMUS can be one of several types:

The important distinction is between floating point numbers and everything else (which all fall under the class of rational numbers). In .fms files, floating point numbers always have a decimal point in them while integers, rationals and mixed numbers don't.

Mixed numbers are simply a convenient and more readable way of representing rational numbers. They are only used in .fms files.

5.4.2 Strings

Strings are sequences of characters (letters, numbers, spaces, punctuation, etc.). In .fms files, they must be quoted if they contain spaces or other characters that could be confused with other important characters in the surrounding context. For example, strings in lists must be quoted if they contain ‘(’, ‘)’, ‘,’ or space characters, since lists are delimited with these. Single or double quotes may be used.

Anything referred to as a string in the documentation can be expressed as a string or a symbol in Lisp, Scheme or SAL. A symbol is converted to a lowercase string before being sent to FOMUS.

5.4.3 Lists

Some of FOMUS's settings require lists of items. In .fms files lists begin with ‘(’ and end with ‘)’. The items (numbers, strings or other lists) in the list may be separated by spaces or delimited with commas. Examples of .fms file lists are ‘(a b c)’, ‘(1, 2, 3)’ and ‘(a b c "," ")")’ (the comma and parenthesis strings must be quoted to avoid confusion). Some lists are described by the documentation as “maps” or “mappings,” in which case each pair of items in the list is a mapping from a string value to some other value. In .fms files, such lists may optionally contain ‘=’ or ‘:’ characters between each pair to make them easier to read. Examples of mappings are ‘(a 1 b 2 c 3)’, ‘(a 1, b 2, c 3)’, ‘(a = 1 b = 2 c = 3)’ and ‘(a: 1, b: 2, c: 3)’.