Type_Queries

Because data types are determined "on the fly" in Raptor, the programmer cannot always be sure what type a variable has during program execution.  In some cases, the programmer may want the program to determine the type of a variable before continuing.  

 

The four functions below can be used to determine the type of a variable during run time.  

 

Each function

 

Is_Array

 

Is_Array(variable)

 

Is_Array is a function that returns true if variable  is a one-dimensional array, false otherwise.

 

 

Is_Character

 

Is_Number(variable)

 

Is_Character is a function that returns true if variable  is a scalar (single) character, false otherwise.

 

 

Is_Number

 

Is_Number(variable)

 

Is_Number is a function that returns true if variable  is a scalar (single) numeric variable, false otherwise.

 

 

Is_String

 

Is_String(variable)

 

Is_String is a function that returns true if variable  is a string variable, false otherwise.

 

 

Is_2D_Array

 

Is_2D_Array(variable)

 

Is_2D_Array is a function that returns true if variable  is a two-dimensional array, false otherwise.