A function performs an operation and returns a value. This value may be the result of the operation, or an indicator that the operation completed successfully or failed. By convention, InterSystems IRIS functions that set a variable to a value set the variable, then return the value of that variable prior
to the operation.
This document describes system functions (also known as intrinsic functions). System functions are identified by a $ character prefix to the name and parentheses following the name. The parentheses are not specified when referring to a function in documentation. You can supplement these system functions by creating user-supplied functions (also known as extrinsic functions). User-supplied functions are identified by a $$ prefix.
The names of ObjectScript special variables also begin with a $ character, but special variables have no parentheses.
To invoke a system function, use the form:
||The name of the function. The preceding dollar sign ($) is required. Function names are shown here in all uppercase letters, but they are, in fact, not case-sensitive. You can abbreviate most function names. In the Synopsis for each function, the full name syntax is first presented, and below it is shown the abbreviated name (if one exists).
One or more values to be passed to the function. Function arguments, or parameters
, are always enclosed in parentheses and follow the function name. The parentheses are mandatory, even if the function has no parameters.
Multiple parameters are separated from each other by commas. The parameters are positional and must match the order of the parameters expected by the function. Missing parameters in this sequence can be indicated by supplying the appropriate number of commas; no trailing commas are required for parameters missing from the end of the parameter list.
Spaces are permitted anywhere in the parameter list. No spaces are permitted between name
and the open parenthesis character.
The Synopsis for each function contains only literal syntactical punctuation. The Synopsis does not include punctuation for format conventions, such as what parameters of the syntax are optional. This information is provided in the table of parameters immediately following the Synopsis.
The one exception is the ellipsis (...). An ellipsis following a comma indicates that the parameter (or parameter group) preceding the comma can be repeated multiple times as a comma-separated list.
Any platform-specific function is marked with the name of the platform that supports it. Any function that is not marked with a platform abbreviation is supported by all InterSystems IRIS platforms.