Skip to main content

Symbols Used in ObjectScript

A table of characters used in ObjectScript as operators, prefixes, and so on.

Table of Symbols

The following are the literal symbols used in ObjectScript for InterSystems IRIS® data platform. (This list does not include symbols indicating format conventions, which are not part of the language.) There is a separate table for symbols used in InterSystems SQL.

The name of each symbol is followed by its ASCII numeric value.

Symbol Name and Usage
[space] or [tab]

White space (Tab (9) or Space (32)): Leading white space (space or tab) is required before every line of code, with the exceptions of labels, and some comment lines.

Within commands, one (and only one) space is required between the command name and the first argument.

Trailing white space (space or tab) is required between the last command argument and any following command or comment on the same line. Trailing whitespace is also required between a label and a following command or comment on the same line.

[two spaces, two tabs, or a space and a tab] Double white space: Trailing double white space required between an argumentless command and the next command on the same line.

Exclamation mark (33): OR logical operator (full evaluation).

In READ and WRITE commands, specifies a new line.

As first character at terminal prompt, load interactive subshell.


Quotes (34): Used to enclose string literals. In Dynamic SQL used to enclose the SQL code as a string argument of the %Prepare() method.

For differences between straight quotes (") and directional quotes (“ ”). see Pattern Matching.


Double quotes: Used to specify the null string (""), which is a zero-length string.

Used to specify a literal quote character within a quoted string.


Pound sign (35): Modulo division operator. Can be used to determine a bit value. For example, $ZA#2 returns the 1’s bit value (0 or 1); with the integer divide (\) operator $ZJOB\1024#2 returns the 1024’s bit value (0 or 1).

In READ and WRITE commands, form feed. In fixed-length READ, number of characters to read.

Prefix for referencing the value of a class parameter from within the class: #ParameterName.

Prefix for many macro preprocessor directives such as: #define, #include, and #if. See also ##.

In class syntax, parameter prefix used to return the parameter value. For example, ##class(%Library.Boolean).#XSDTYPE or myinstance.#EXTENTQUERYSPEC.

In ZBREAK debugging, an iteration counter for disabling a specified breakpoint or watchpoint. For example, the following disables the breakpoint at label^rou for 100 iterations: ZBREAK -label^rou#100.

In the callout routine ZFENTRY, an argtype prefix indicating a DOUBLE data type: #D or #F.

Regular expression end-of line comment indicator (in (?x) mode only).


Double pound sign: Object class invocation prefix: ##class(classname).methodname() or ##class(classname).#parametername.

##super() syntax is used to invoke an overridden superclass method.

Prefix for certain macro preprocessor directives, including ##continue, ##expression, ##function, ##lit, ##sql, and ##unique. ##sql is invoked to execute a line of SQL code from within ObjectScript: ##sql(SQL command).

##; Double pound sign semicolon: Single-line comment indicator; can be used in column 1 in either ObjectScript or Embedded SQL.
#; Pound sign semicolon: Single-line comment indicator; can be used in column 1.

Dollar sign (36): system function prefix: $name(parameters).

Special variable prefix: $name.

$Znnn (a name beginning with $Z) can be a user-defined function or special variable defined using %ZLANG language extension library. It can also be an InterSystems-supplied system function or special variable.

Regular expression end of string anchor; for example, (USA)$.

In ZBREAK debugging, a single-step breakpoint.

As first character at terminal prompt, load interactive subshell.


Double dollar sign: user-supplied function call prefix: $$myname(parameters). $$ is returned by $STACK when context was established by a reference to a user-supplied function.

Prefix to a routine name to directly invoke that routine.

$$$ Triple dollar sign: Macro invocation prefix.

Percent sign (37): Permitted as first character of names: (1) local variable names, indicating a “% variable” with special scoping rules, used for locking. (2) routine names, often indicates a system utility. (3) Package class names, such as %SYSTEM.class and %Library.class as well as class names within the %Library package, including data types such as %String. (4) %Persistent object property names and method names, such as %Dialect, %New(), and %OpenId(). A %On... method name is a callback method. (5) Labels.

Required as first character of a macro argument.

Prefix for some embedded SQL variables: %msg, %ROWCOUNT, and for some SQL keywords: %STARTSWITH.

See i% (instance variable).


Double percent sign: Prefix for the pseudo-field reference variable keywords %%CLASSNAME, %%CLASSNAMEQ, %%ID, and %%TABLENAME, used in ObjectScript computed field code and trigger code.


Ampersand (38): AND logical operator (full evaluation). $BITLOGIC bitstring AND operator.

In a formal parameter list, an optional, non-functional variable name prefix that marks a parameter as one that should be passed by reference. The & is a marker and is not part of the variable name. For example Calc(x,&y).

Shell invocation prefix for embedded code. For example &sql (SQL commands).

UNIX® batch command.


Double ampersand: AND logical operator (partial evaluation).

Regular expression AND logical operator.

Symbol Name and Usage

Apostrophe (39): Unary Not operator. Can be combined with relational operators: '= (not equal to), '< (not less than), '> (not greater than); or pattern match '(operand?pattern).

Unary Not operator. Can be combined with logical operators: '& (Not And) and '| (Not Or). Cannot be combined with && or || logical operators.

European numeric group separator.

( )

Parentheses (40,41): Used to enclose a procedure or function parameter list. Parentheses are mandatory, even when empty.

Used to nest expressions; nesting overrides the InterSystems IRIS default of strict left-to-right evaluation of operators, and allows you to give precedence to expressions.

Used to specify array subscripts for a local variable: a(1,1), a global variable: ^a(1,1), or a process-private global: ^||a(1,1).

Used to enclose an alternating pattern match (following a ?).

With NEW and KILL commands, exclusive (everything but) indicator.

For postconditionals, required if postconditional contains a space.

Used to enclose embedded SQL code, following an &sql shell invocation command: &sql(SQL commands).

Regular expression match string (Boston) or string list (Boston|New York|Paris). Regular expression grouping construct.

When setting a JSON object or array value, used to enclose an ObjectScript literal or expression.


Asterisk (42): Multiplication operator.

In $ZSEARCH, wild card for zero, one, or more than one characters.

In $EXTRACT, $LIST, and $PIECE specifies the final item at the end of the string; can be used with a signed integer to specify offset from the end, for example *-2, *+1.

In WRITE command, specifies an integer code for a character. For example, WRITE *65 writes the letter “A”.

As prefix to $ZTRAP string value, specifies that call stack level should be left unchanged.

In ZBREAK a name prefix denoting a local variable. In certain error codes returned to $ZERROR, a name prefix denoting an undefined local variable, class, method, or property.

Regular expression 0 or more character quantifier.

** Double asterisk: Exponentiation operator. For example, 4**3=64.
*+ Asterisk plus: In SET $EXTRACT, SET $LIST, and SET $PIECE specifies offset beyond the last item of the string; used to append values. For example, *+1 appends an item to the end of string.

Asterisk minus: In WRITE command, specifies a device control integer code. For example, WRITE *-10 clears the terminal input buffer.

In $EXTRACT, $LIST, $LISTGET, and $PIECE specifies offset backwards from the last item of the string; for example, *-1 is the next-to-last item.

*/ Asterisk slash: Multi-line comment ending indicator. Comment begins with /*.

Plus sign (43): Unary arithmetic positive operator. When prepended to a string or a function that returns a string forces numeric evaluation; for example, WRITE +"007.0" or WRITE +$PIECE(str,",",2).

Addition operator.

Integer line count offset from a label: label+offset. In $ZTRAP, integer line count offset from top of a procedure: +offset^procname.

With LOCK and ZBREAK commands, a prefix that enables or applies/increments the item that follows.

Regular expression 1 or more character quantifier.

+= Plus sign, Equal sign In commands and functions that output to a file, means that output data is appended to the existing file contents. Just an equal sign means that output data overwrites the contents of an existing file. See $ZF(-100).

Comma (44): In functions and procedures, multiple parameters separator.

In commands, multiple arguments delimiter.

In array variables, subscript levels separator.

Numeric group separator or decimal point character, depending on the locale. Configurable using the SetFormatItem()Opens in a new tab NLS class method.

In $ECODE, surround error code: ,M7,

,, Two commas: In functions, a placeholder for an unspecified positional parameter (which takes a default value).

Minus sign (45): Unary arithmetic negative operator.

Subtraction operator.

With LOCK and ZBREAK commands, a prefix that disables or decrements/removes the item that follows.

Regular expression character range operator; for example [A-Z].


Double minus sign: With ZBREAK command, a prefix that removes the item that follows.

Regular expression subtract (except for) logical operator.


Period (46): Decimal point character or numeric group separator, depending on the locale. Configurable using the SetFormatItem()Opens in a new tab NLS class method.

Object dot syntax used to refer to a method or property of an object instance: myinstance.Name.

Windows and UNIX®: As a pathname or part of a pathname, specifies the current directory. Used by $ZSEARCH.

May be included within a global name or a routine name.

Prefix to a variable or array name in an actual parameter list that specifies passing by reference: SET x=$$Calc(num,.result).

Pattern match repeat indicator.

Regular expression single-character wildcard.


Double period: relative dot syntax: a prefix that specifies a method or property of the current object. For example, WRITE

Windows and UNIX®: As a pathname or part of a pathname, specifies the parent directory of the current directory. Used by $ZSEARCH.

..# Double period, pound sign: A prefix for references to a class parameter from within a method of the same class. For example, WRITE ..#MyParam

Triple period (ellipsis): A suffix appended to the last (or only) parameter in a formal parameter list or actual parameter list that is used to specify a variable number of parameters. For example, Calc(x,y,params...). This syntax is commonly used with a dynamic dispatch method, such as Method %DispatchMethod(Method As %String,Params...)

In ZWRITE output, trailing ellipsis indicates string truncation.

In a Terminal prompt, leading characters that indicate that a long implied namespace has been truncated to its final 24 characters.

(This literal use of ellipsis in code should not be confused with format convention usage in our documentation, where ellipsis indicates that an argument can be repeated multiple times, or that a section of code is intentionally omitted.)


Slash (47): Division operator (keep remainder).

In OPEN, CLOSE, and USE commands, I/O keyword parameter prefix. In READ and WRITE, device control mnemonic prefix.

With ZBREAK command, a subcommand prefix.

// Double slash: Single-line comment indicator.
/// Triple slash: Single-line comment indicator. Can be used in column 1 for macro comments.
/* Slash asterisk: Multi-line comment begins indicator. Comment ends with */.

Colon (58): In commands, postconditional indicator, for example, WRITE:x=0 “nothing”.

In commands such as OPEN, USE, CLOSE, JOB, LOCK, READ, and ZBREAK a placeholder separator of arguments and/or separator of parameters within an argument. For example, LOCK var1:10,+var2:15, or OPEN "|TCP|4":(:4200:"PSTE"::32767:32767)

In $CASE and $SELECT functions, used to specify test:value paired items.

In a JSON object, used to specify a key:value pair. For example, SET JSONobj={"name":"Sam"}.

In $JOB special variable value, separates process ID (PID) and nodename. For example, 11368:MYCOMPUTER.

Prefix indicating an ObjectScript label within embedded ObjectScript code, such as SQL trigger code, where the label cannot be coded in column 1.

; Semicolon (59): Single-line comment indicator.
;; Double semicolon: Retained single-line comment indicator.

Less than (60): Less than operator.

<= Less than, Equal sign: Less than or equal to operator.
'< Not operator, Less than: Greater than or equal to operator.

Equal sign (61): Equal to comparison operator.

In SET command, assignment operator.

'= Not operator, Equal sign: Not equal to comparison operator
> Greater than (62): Greater than operator.
>= Greater than, Equal sign: Greater than or equal to operator.
'> Not operator, Greater than: Less than or equal to operator.

Question mark (63): Pattern match operator.

Regular expression 0 or 1 character quantifier suffix. Regular expression mode prefix. For example, (?i) case mode on; (?-i) case mode off.

In $ZCONVERT translation table results, represents an untranslatable character.

In $ZSEARCH, wild card for a single character.

In READ and WRITE commands, column position indicator.

In ZBREAK command, display help text.

In Dynamic SQL, an input parameter variable supplied by the %Execute() method.

?# Question mark and pound sign: Regular expression embedded comment prefix. For example, (?# this is a comment).
@ At sign (64): Indirection operator. For subscript indirection, appears as: @array@(subscript).
A, a The letter “A” (65,97): Pattern match code (following a ?).
C, c The letter “C” (67,99): Pattern match code (following a ?).
E, e

The letter “E” (69,101): Scientific notation operator. for example, 4E3=4000. The uppercase “E” is the standard exponent operator; the lowercase “e” is a configurable exponent operator, using the ScientificNotation() method of the %SYSTEM.ProcessOpens in a new tab class.

Pattern match code (following a ?).

I, i The letter “I” (73,105): Integer indicator in $NUMBER function.
i% The letter “i” percent: instance variable syntax: i%propertyname.
L, l The letter “L” (76,108): Pattern match code (following a ?).
N, n The letter “N” (78,110): Pattern match code (following a ?).
P, p The letter “P” (80,112): Pattern match code (following a ?).
U, u The letter “U” (85,117): Pattern match code (following a ?).

Symbol Name and Usage
[ Open square bracket (91): Contains operator.
[ ]

Square brackets (91,93): Used to enclose a namespace name, directory name, or the null string in an extended global reference ^["namespace"]global. Used to specify a process-private global with the following syntax: ^["^"]ppgname or ^["^",""]ppgname.

In a structured system variable (SSVN) used to enclose a namespace name ^$["namespace"]GLOBAL() to specify an extended SSVN reference.

In XECUTE command or a procedure definition, encloses a public variables list: [a,b,c]

In ZWRITE or argumentless WRITE command display, encloses an object reference (OREF).

Regular expression match any character in a list [ABCD] or a range [A-D].

JSON dynamic array expression, which returns an instance of %DynamicArrayOpens in a new tab. For example, SET JSONarray=[1,2,3].

[: :] Square brackets and colons: Regular expression character type keyword. For example, [:alpha:].

Backslash (92): Integer division operator (drop remainder). Can be used with modulo (#) operator to determine a bit value; for example, $ZA\16#2 returns the value (0 or 1) of the $ZA 16 bit.

Regular expression escape prefix. JSON string escape prefix, for example\".

] Close square bracket (93): Follows operator.
]] Double close square brackets: Sorts After operator.

Caret (94): Global variable name prefix, for example, ^myglobal(i).

Routine invocation prefix, for example, DO ^routine or DO label^routine.

Implied namespace prefix with the format ^system^dir.

$BITLOGIC bitstring XOR (exclusive or) operator.

Regular expression beginning of string anchor; for example, ^A. Regular expression character type keyword inverse. For example, [:^alpha:].

^^ Double caret: Implied namespace prefix for the current system, with the format ^^. or ^^dirpath.
^$ Caret dollar: Structured system variable prefix. For example, ^$GLOBAL() or ^$|"namespace"|GLOBAL().
^$[ Caret dollar bracket: In a structured system variable (SSVN) used to enclose a namespace name ^$["namespace"]GLOBAL() to specify an extended SSVN reference.
^$| Caret dollar bar: In a structured system variable (SSVN) used to enclose a namespace name ^$|"namespace"|GLOBAL() to specify an extended SSVN reference.
^% Caret percent: System global prefix, for example, ^%utility or ^%qStream.
^( Caret parenthesis: A naked global reference, where the most recently named subscripted global name is implied. For example: ^(1,2)
^[ Caret open square bracket: see Square brackets.

Caret bar: depending on the character(s) that follow, this may be:

An extended global reference, a global reference where a pair of bars encloses a quoted namespace name, a directory name, or a null string. The bars and their contents are not part of the global name. For example: ^|""|globname, or ^|"namespace"|globname.

A process-private global prefix with the prefix ^||. The bars are part of the process-private global name. For example, ^||ppgname. Also valid as syntax for this process-private global: ^|"^"|ppgname.

An extended routine reference, where a pair of bars encloses a quoted namespace name, a variable that resolves to a namespace name, or a null string. For example, DO ^|"namespace"|routine.


Underscore (95): Concatenate operator.

As first character of a name.

{ }

Curly braces (123,125): Code block delimiters used in procedures, for TRY and CATCH blocks, or with the IF, FOR, DO WHILE, and WHILE commands.

In SQL compute code, encloses a field name. For example, SET {Age}=18, or SET {f1} = {f2}.

In XECUTE command, encloses code in which variables are treated as private.

Regular expression quantifier; for example, {5} = 5 times; {3,6} = at least 3 times but not more than 6 times. Regular expression character type letter code or keyword with \p prefix; for example, \p{LL}, \p{lower}. Regular expression single character keyword with \N prefix; for example, \N{comma}.

JSON dynamic object expression, which returns an instance of %DynamicObjectOpens in a new tab. For example, SET JSONobj={"name":"Sam"}.

{*} Asterisk within curly braces: In SQL compute code, specifies the current SQL field name.

Vertical bar (124): $BITLOGIC bitstring OR operator.

Regular expression OR operator.

For other uses, see ^| and ^$.


Double vertical bar (bar bar): OR logical operator (short circuit evaluation).

Compound ID indicator. Used by InterSystems IRIS to display a generated compound object ID (a concatenated ID). This can be either an IDKey defined on multiple properties (prop1||prop2), or an ID for a parent/child relationship (parent||child).


Tilde (126): $BITLOGIC bitstring NOT (one's complement) operator.

In Windows pathnames, indicates 8.3 compression of long names. For example: c:\PROGRA~1\. To convert compressed directory names, use the NormalizeDirectory()Opens in a new tab method of the %Library.FileOpens in a new tab class.

In UNIX pathnames, indicates the current user’s home directory. For example: ~myfile or ~/myfile.

FeedbackOpens in a new tab