Appendix A
ICL Functions

Where the type is given as ‘Real or Integer’ the type of the result is the same as the type of the argument.

Name Type Definition
ABS(X) Real or Integer x
ASIN(X) Real sin 1xwhere 1 x 1
π/2 result π/2
ASIND(X) Real sin 1xwhere 1 x 1
90 result 90
ACOS(X) Real cos 1xwhere 1 x 1
0 result π
ACOSD(X) Real cos 1xwhere 1 x 1
0 result 180
ATAN(X) Real tan 1x
π/2 result π/2
ATAND(X) Real tan 1x
90 result 90
ATAN2(X1,X2) Real tan 1(x1/x2)
π < result π according to quadrant
in which point (x2, x1) lies
Name Type Definition
ATAN2D(X1,X2) Real tan 1(x1/x2)
180 < result 180 according to quadrant
in which point (x2, x1) lies
BIN(I,n,m) String integer I formatted in binary
into an n char string with m significant digits
CHAR(I) String Character whose ASCII value is I
COS(X) Real cos x (x in radians)
COSD(X) Real cos x (x in degrees)
COSH(X) Real cosh x
DATE() String The Current Date
DEC(I,n,m) String integer I formatted in decimal
into an n char string with m significant digits
DECL(S) Real A Declination in Radians
from a string in degrees, minutes, seconds
DEC2S(R,NDP,SEP) String String in DMS from
Dec in radians. NDP decimal places on
seconds. Character SEP separates fields
DIM(X1,X2) Real or Integer Positive difference
x1 min(x1, x2)
ELEMENT(I,DELIM,S) String Ith element of delimited string, I 0
EXP(X) Real ex
FILE_EXISTS(S) Logical TRUE if file S exists
FLOAT(I) Real Integer I converted to real
GETNBS(S) Any Value of noticeboard item
GET_SYMBOL(S) String Get Value of DCL Symbol
Name Type Definition
HEX(I,n,m) String integer I formatted in hexadecimal
into an n char string with m significant digits
IAND(I1,I2) Integer Bitwise AND of two integers
ICHAR(S) Integer ASCII value of first character of String
IEOR(I1,I2) Integer Bitwise exclusive OR of two integers
IFIX(X) Integer Real to Integer by Truncation
Equivalent to INT
INDEX(S1,S2) Integer Position of first occurrence
of Pattern S2 in string S1 (Zero if not found)
INKEY() Integer Key value of last trapped key pressed
Only works in screen mode
INOT(I) Integer Bitwise Complement of Integer
INT(X) Integer Real to Integer by Truncation
INTEGER(X) Integer The value of X converted to an integer
Equivalent to NINT
IOR(I1,I2) Integer Bitwise OR of two integers
KEYVAL(S) Integer Value of key with name S
LEN(S) Integer Length of String S
LGE(S1,S2) Logical True if S1 S2 (ASCII collating sequence)
LGT(S1,S2) Logical True if S1 > S2 (ASCII collating sequence)
LLE(S1,S2) Logical True if S1 S2 (ASCII collating sequence)
LLT(S1,S2) Logical True if S1 < S2 (ASCII collating sequence)
LOG(X) Real ln x
Name Type Definition
LOG10(X) Real log 10x
LOGICAL(X) Logical The value of X converted to logical
MAX(X1,X2, ...) Real or Integer Maximum of two or more arguments
MIN(X1,X2, ...) Real or Integer Minimum of two or more arguments
MOD(X1,X2) Real or Integer x1 int(x1/x2) ×x2
NINT(X) Integer Nearest integer to X
OCT(I,n,m) String integer I formatted in octal
into an n char string with m significant digits
OK(stat) Logical True if VMS Status OK
RA(S) Real Right Ascension in Radians
from a string in hours, minutes, seconds
RA2S(R,NDP,SEP) String String in HMS from
RA in radians. NDP decimal places on
seconds. Character SEP separates fields
RANDOM(I) Real Random number between 0 and 1 from seed I
I must be a variable
REAL(X) Real The value of X converted to real
SIGN(X1,X2) Real or Integer x1 with sign of x2
SIN(X) Real sin x (x in radians)
SIND(X) Real sin x (x in degrees)
SINH(X) Real sinh x
SNAME(S,n[,m]) String String formed by concatenating string S with integer
n formatted into m characters with leading zeros.
If m is omitted, SNAME uses the required number
of characters
Name Type Definition
STRING(X) Logical The value of X converted to a string
SQRT(X) Real x
SUBSTR(S,n,m) String Substring of S beginning at n ( 1) of length m
TAN(X) Real tan x (x in radians)
TAND(X) Real tan x (x in degrees)
TANH(X) Real tanh x
TIME() String The current time
TYPE(X) String The Type of Variable X
‘REAL’, ‘INTEGER’, ‘LOGICAL’,
‘STRING’ or ‘UNDEFINED’
UNDEFINED(X) Logical TRUE if X is undefined
UPCASE(S) String String S converted to Upper case
VARIABLE(proc,X) Any Returns value of variable X of procedure proc