Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >

ToBuffer() Method


This function converts its parameter to a buffer.

Syntax

ToBuffer(value)

Parameter
Description
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:

Data Type
Returns
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. Avoid using it in a script that may be used with a JavaScript interpreter that does not support it.

See Also

ToBytes() Method and ToString() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003