Tivoli Service Desk 6.0 Developer's Toolkit Script Language Reference
Return to Main Page
Returns the arc cosine of a given expression between -1.0 and 1.0, in degrees.
FUNCTION ACos (VAL u: REAL): REAL;
Argument Name | Description |
u | The input expression. Must have a value between -1.0 and 1.0. |
VARIABLES r: Real; ACTIONS r:=ACos(0.5);
Returns the arc sine of an expression between -1.0 and 1.0 in degrees.
FUNCTION ASin (VAL u: REAL): REAL;
Argument Name | Description |
u | The input expression. Must have a value between -1.0 and 1.0. |
VARIABLES r: REAL; ACTIONS r:=ASin(-0.7);
Returns the arc tangent of a given expression between -1.0 and 1.0 in degrees.
FUNCTION ATan (VAL u: REAL): REAL;
Argument Name | Description |
u | The input expression. Must have a value between -1.0 and 1.0. |
VARIABLES r: REAL; ACTIONS r:=ATan(.5);
Returns the cosine of an angle measured in degrees.
FUNCTION Cos (VAL u: REAL): REAL;
Argument Name | Description |
u | An input angle measured in degrees |
VARIABLES r: REAL; ACTIONS r:=Cos(180);
Calculates the hyperbolic cosine of a numeric expression and returns the result as a real number in degrees.
FUNCTION CosH (VAL u: REAL): REAL;
Argument Name | Description |
u | A real-value expression |
VARIABLES r: REAL; ACTIONS r:=CosH(0.5);
This statement computes the exponential function of its argument.
FUNCTION Exp (VAL u: REAL): REAL;
Argument Name | Description |
u | Real-value expression to be treated as an exponent of e |
Calculates e to a given power and returns the result as a real number.
VARIABLES r: REAL; ACTIONS r:=Exp(2.0);
Exp does not return any codes. It returns the exponential of a finite argument (e raised to a given power, where e is the base of the natural logarithm). If the computation overflows the underlying double precision floating point value, the result is undefined.
Returns the natural log of a number.
FUNCTION Ln (VAL u: REAL): REAL;
Argument Name | Description |
u | A real-value positive expression |
Calculates the natural log of the argument, which must be a positive number.
VARIABLES r: REAL; ACTIONS r:=Ln(3);
Return Code | Description |
any | Natural log of argument |
Log
Returns the common logarithm (base 10) of a number.
FUNCTION Log (VAL u: REAL): REAL;
Argument Name | Description |
u | A real-value positive expression |
Returns the common logarithm (base 10) of the input expression. Note that Log(x)=y is the same as Power(10,y)x.
VARIABLES r: REAL; ACTIONS r:=Log(2);
Return Code | Description |
any | Common (base 10) logarithm of argument. |
Ln
Returns the result of raising a number to a given power.
FUNCTION Power (VAL u: REAL, VAL v: REAL): REAL;
Argument Name | Description |
u | The number to be exponentiated. |
V | The exponent. |
VARIABLES r: REAL; ACTIONS r:=Power(2,8);
Return Code | Description |
Any | The result of raising a number to a given power |
Generates a random number in a given range.
FUNCTION Random (VAL lo, hi: INTEGER): INTEGER;
Argument Name | Description |
lo | The low bound for the random number |
hi | The high bound for the random number |
Returns a random number as an integer between two inclusive boundaries. The random number generator automatically seeds using the system clock.
VARIABLES guess: INTEGER; ACTIONS guess:=Random(1,10);
Return Code | Description |
Any | Function result |
Rounds a real-value number to the nearest integer value, using the US rounding algorithm (which adds .5 and then truncates).
FUNCTION Round (VAL u: REAL): INTEGER;
Argument Name | Description |
u | A real-value expression to be rounded |
VARIABLES i: INTEGER; ACTIONS i:=Round(3.14);
Return Code | Description |
Any | Rounded return value |
Returns the sine of an input value, expressed in degrees
FUNCTION Sin (VAL u: REAL): REAL;
Argument Name | Description |
u | A real-value expression representing an angle in degrees. |
VARIABLES r: REAL; ACTIONS r:=Sin(30.0);
Returns the sine of an input value, expressed in degrees.
SinH
Returns the hyperbolic sine of an expression.
FUNCTION SinH (VAL u: REAL): REAL;
Argument Name | Description |
u | The argument to this function is a real valued expression. |
VARIABLES r: REAL; ACTIONS r:=SinH(3);
Returns the hyperbolic sine of an expression.
Returns the square root of a number.
FUNCTION Sqrt (VAL u: REAL): REAL;
Argument Name | Description |
u | An expression whose square root is to be calculated. It should be a positive number. |
VARIABLES r: REAL; ACTIONS r:=Sqrt(4.0);
Returns the tangent of an angle, expressed in degrees.
FUNCTION Tan (VAL angle: REAL): REAL;
Argument Name | Description |
u | A real-value expression representing an angle in degrees |
VARIABLES r: REAL; ACTIONS r:=Tan(30);
Returns the tangent of an angle, expressed in degrees.
TanH
Returns the hyperbolic tangent of an angle.
FUNCTION TanH (VAL u: REAL): REAL;
Argument Name | Description |
angle | A real-value expression representing an angle in degrees |
VARIABLES r: REAL; ACTIONS r:=TanH(3.0);
Returns the hyperbolic tangent of an expression.
Tan
Tivoli Service Desk 6.0 Developer's Toolkit Script Language Reference