Siebel eScript Language Reference > Siebel eScript Commands > Conversion Methods >
ToBuffer() Method
This function converts its parameter to a buffer. Syntax
ToBuffer(value)
|
|
value |
The value to be converted to a buffer |
Returns
A sequence of ASCII bytes that depends on value's original data type, according to the following table.
|
|
Boolean |
The string "false" if value is false; otherwise, "true" |
null |
The string "null" |
number |
If value is NaN, "NaN" . If value is +0 or -0, "0" ; if value is POSITIVE_INFINITY or NEGATIVE_INFINITY, "Infinity" ; if value is a number, a string representing the number |
object |
The string "[object Object]" |
string |
The text of the string |
undefined |
The string "undefined" |
Usage
This function converts value to a buffer; what is placed in the buffer is a character array of ASCII bytes. CAUTION: The ToBuffer() function is unique to Siebel eScript. Before using it, confirm that the JavaScript interpreter that will run the script supports Siebel eScript functions. Avoid using this function in a script that may be used with a JavaScript interpreter that does not support it.
See Also
ToBytes() Method ToString() Method
|