Skip to content

Data types

Peter Johnson edited this page Nov 25, 2022 · 22 revisions

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
Text Plain text strings The text itself
Int 32 bit integer value Integer as a base 10 string
Float Floating point number Floating point value rendered to full precision. Very large or small values may use scientific notation.
DateTime Representation of a date and time The ISO standard date string
File Represents a file in the file system Full path to the file
Directory Represents a directory in the file system Full path to the directory
URL Represents a URL Complete URL
OS Object describing the underlying operating system OS version
Config Object giving access to program configuration Empty string (there's no one sensible default)
Any Wraps any of the other data types. The default string of the wrapped data type.
Null A null object. Has no value or attributes. Empty string.

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.

Clone this wiki locally