The result of calculations, user input and similar things are stored into variables. A variable name starts with a letter, and may include letters, digits and the underscore character. Note that all non-ASCII Unicode characters are treated as letters, so you can use things like ‰ or € in variable names.
Variable values (and intermediate values in calculations) can have three different types: integer (number), string (text) or array (list). Fractional or floating-point numbers are not supported. As most things in macros use discrete values (like pixel coordinates or counts), you will not really miss them.
Numbers are written in the usual decimal way, like 42 or 100. Strings are enclosed into quotation marks, like "Hello". If a string should include a quotation mark itself, the quotation mark is doubled.
Every parameter or expression part needs a specific input data type. If the input type of the value is different from the actual type, it is automatically converted. A string is converted to an integer by checking if it is a decimal representation of a number. If it is, this representation is used. In all other cases the value is converted to zero. For example "42" is converted to 42, but "42.5" is converted to 0, as floating-point numbers are not supported. Conversion of numbers to strings is as expected. Converting a list to a string will result in a multi-line string of which each line is the conversion of one list element. The first line is {List, and the last line is }. All other conversions do not produce errors but cause undefined results.
There is also a special "wrapper" data type available that wraps any .NET objects. These objects cannot be manipulated from macros, they can just be passed back to commands that understand them. When converting them to strings, a string starting with "{Object: " will be returned that contains some information about the type of the contained object. Things like hotkeys or images that do not have any useful string or list representation will be wrapped into these kinds of objects.