next up previous 63
Next: ICL Commands
Up: ICL and ADAM
Previous: Multiple Concurrent Actions


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 $\mid x \mid$  
       
ASIN(X) Real $\sin^{-1} x \; where -1 \leq x \leq 1 $  
    $ -\pi/2 \leq result \leq \pi/2$  
       
ASIND(X) Real $\sin^{-1} x \; where -1 \leq x \leq 1 $  
    $ -90 \leq result \leq 90$  
       
ACOS(X) Real $\cos^{-1} x \; where -1 \leq x \leq 1 $  
    $ 0 \leq result \leq \pi$  
       
ACOSD(X) Real $\cos^{-1} x \; where -1 \leq x \leq 1 $  
    $ 0 \leq result \leq 180$  
       
ATAN(X) Real $\tan^{-1} x $  
    $ -\pi/2 \leq result \leq \pi/2$  
       
ATAND(X) Real $\tan^{-1} x $  
    $ -90 \leq result \leq 90$  
       
ATAN2(X1,X2) Real $\tan^{-1} (x_{1}/x_{2}) $  
    $ -\pi < result \leq \pi $ according to quadrant  
    in which point ($x_{2},x_{1}$) lies  
       
Name Type Definition  
       
ATAN2D(X1,X2) Real $\tan^{-1} (x_{1}/x_{2}) $  
    $ -180 < result \leq 180 $ according to quadrant  
    in which point ($x_{2},x_{1}$) 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  
    $x_{1} - min(x_{1},x_{2})$  
       
ELEMENT(I,DELIM,S) String Ith element of delimited string, I $\geq 0$  
       
EXP(X) Real $e^{x}$  
       
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 $\geq$ S2 (ASCII collating sequence)  
       
LGT(S1,S2) Logical True if S1 $>$ S2 (ASCII collating sequence)  
       
LLE(S1,S2) Logical True if S1 $\leq$ 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_{10} x $  
       
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 $x_{1} - int(x_{1}/x_{2}) \times x_{2}$  
       
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 $x_{1}$ with sign of $x_{2}$  
       
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 $\sqrt{x}$  
       
SUBSTR(S,n,m) String Substring of S beginning at n ($\geq$ 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  
       



next up previous 63
Next: ICL Commands
Up: ICL and ADAM
Previous: Multiple Concurrent Actions

ICL The Interactive Command Language for ADAM
Starlink Guide 5
J A Bailey
A J Chipperfield

9th June 1998
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council