GPL Syntax Rules
When writing GPL, it is important to keep the following rules in mind.
- Except in quoted strings, whitespace is irrelevant, including line breaks. Although it is possible to write a complete GPL block on one line, line breaks are used for readability.
- All quoted strings must be enclosed in quotation marks/double-quotes (for example, "text"). You cannot use single quotes to enclose strings.
- To add a quotation mark within a quoted string, precede the quotation mark with an escape character (\) (for example, "Respondents Answering \"Yes\"").
- To add a line break within a quoted string, use \n (for example, "Employment\nCategory").
- GPL is case sensitive. Statement labels and function names must appear in the case as documented. Other names (like variable names) are also case sensitive.
- Functions are separated by commas. For example:
ELEMENT: point(position(x*y), color(z), size(size."5px"))
- GPL names must begin with an alpha character and can contain alphanumeric
characters and underscores (_), including those in international character
sets. GPL names are used in the SOURCE, DATA, TRANS,
and SCALE statements to assign the result of a function
to the name. For example, gendervar in the following
example is a GPL name:
DATA: gendervar=col(source(s), name("gender"), unit.category())