Skip to content

#IFTYPE

#IfType

Purpose

The #IfType command allows you to specify conditionally compiled code based on the type of a symbol.

Syntax

#IfType {symbol} {type-list}
{code to compile if symbol is in the type-list}
#Else
{code to compile if symbol is not in the type-list}
#EndIf

Argument Explanation

  • symbol: The identifier that you wish the compiler to check. It can be any valid token or identifier.

  • type-list: The list of type-checking characters that the {symbol} is tested against (see below).

What It Does

Compiles the true code if the class of {symbol} is in the {type-list}; otherwise, it compiles the false code.

Types

Character Meaning
S String
N Number
D Date
I Integer
E Expression
# Indicator (obsolete)
X Not an indicator (obsolete)
O Group options {}
B Group indicators {} (obsolete)
L Label