-
Notifications
You must be signed in to change notification settings - Fork 0
Data types
⚠️ ⚠️ THIS WIKI IS BEING USED TO JOT DOWN IDEAS AT PRESENT. DON'T ASSUME ANYTHING IS FIXED.⚠️ ⚠️
All placeholders, variables, commands and filters return data of a given type.
The supported types are given in the following table. Each type has a default string representation.
Type | Description | Default string | Truthiness |
---|---|---|---|
Text | Plain text strings | The text itself | All non-empty text is truthy |
Int | 32 bit integer value | Integer as a base 10 string | All non-zero integers are truthy. |
Float | Floating point number | Floating point value rendered to full precision. Very large or small values may use scientific notation. | All floats that do not test equal to zero are truthy |
Boolean | Boolean value: values are specified using commands @true and @false
|
"1" for true and "0" for false |
@true is truthy! |
DateTime | Representation of a date and time | The ISO standard date string | Always truthy |
File | Represents a file in the file system | Full path to the file | Always truthy |
Directory | Represents a directory in the file system | Full path to the directory | Always truthy |
URL | Represents a URL | Complete URL | Always truthy |
OS | Object describing the underlying operating system | OS version | Always truthy |
Any | Wraps any of the other data types. | The default string of the wrapped data type. | Truthy if the wrapped data type is truthy |
Null | A null object. Has no value or attributes. | Empty string. | Always falsey |
The pseudo type Number is used in the documentation. It is used to mean either an Int or a Float.
A placeholder itself has type Text when rendered. Variables always return type Text. The return type of @
commands varies according to the command. See the command reference for details. The input and output types of filters depend on the filter. See the filter reference for details.
Various cast filters are provided for converting from some types to others. In the absence of any conversion filter the last command, variable or filter in a placeholder is converted to Text by its default text converter.