Convert Value to Buffer Method

The Convert Value to Buffer method converts the value that the value argument contains to a sequence of ASCII bytes. It then places this value in a buffer. These bytes depend on the data type of the value that the value argument contains. This method is unique to Siebel eScript. For more information, see Make Sure the JavaScript Interpreter Can Run a Function.

Format

ToBuffer(value)

The following table describes the arguments for the Convert Value to Buffer method.

Argument Description

value

The value that this method saves to a buffer.

Values That the Convert Value to Buffer Method Returns

The following table describes the values that the Convert Value to Buffer method returns.

Data Type Return Value

Boolean

This method returns one of the following values:

  • If the value that the value argument contains is false, then it returns the following value:

false

  • If the value that the value argument contains is not false, then it returns the following value:

true

null

This returns the following string:

null

number

This method returns a value depending on which of the following values the value argument contains:

  • NaN. It returns the following value:

NaN

  • +0 or -0. It returns the following value:

0

  • POSITIVE_INFINITY or NEGATIVE_INFINITY. It returns the following value:

Infinity

  • A number. It returns a string that includes this number.

For more information on the number object, see NaN Numbers.

object

This method returns the following string:

[object Object]

string

This method returns the text of the string.

undefined

This method returns the following string:

undefined