String
The String function converts an integer, float, or boolean expression to a string.
Syntax
The String function
has the following syntax:
String = String(Expression)Parameters
The String function
has the following parameters.
Parameter |
Format |
Description |
|---|---|---|
|
Integer | Float | Boolean |
Expression to be converted to a string. |
Return value
Converted string value.
Example
The following example shows how to convert integers, floats, and boolean expressions to a string.
MyString = String(123);
Log(MyString);
MyString = String(123.54);
Log(MyString);
MyString = String(true);
Log(MyString);This example prints the following message to the policy log for IPL:
Parser Log: 123
Parser Log: 123.54
Parser Log: trueThis example prints the following message to the policy log for JavaScript. JavaScript treats numbers as doubles, as a result, numbers display using decimals:
Parser Log: 123.0
Parser Log: 123.54
Parser Log: true