Siebel eScript Language Reference > Methods Reference > Conversion Methods >

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)

Table 93 describes the arguments for the Convert Value to Buffer method.

Table 93. 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

Table 94 describes the values that the Convert Value to Buffer method returns.

Table 94. 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

Siebel eScript Language Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.