Siebel eScript Language Reference > Methods Reference > Siebel Library Methods >

Siebel Library Get Pointer Address Method


The Siebel Library Get Pointer Address method gets the address in memory of the first byte of data in a buffer variable. It returns the address of the pointer to the buffer variable. For more information, see Buffer Methods.

CAUTION:  A pointer is valid only until a script modifies the variable that the bufferVar argument identifies or until the variable goes out of scope in a script. Placing data in the memory that this variable occupies after such a modification is not recommended. Be careful not to place more data than this memory can hold.

Format

SElib.pointer(bufferVar])

Table 120 describes the arguments for the Siebel Library Get Pointer Address method.

Table 120. Arguments for the Siebel Library Get Pointer Address Method
Argument
Description

bufferVar

The name of a buffer variable.

Example

The following example includes the Siebel Library Get Pointer Address method:

TheApplication().TraceOn("c:\\eScript_trace.txt","allocation","all");
var v = new Buffer("Now");
// Collect "Now", the original value, for display.
TheApplication().Trace(v);
// Get the address of the first byte of v, "N"
var vPtr = SElib.pointer(v);
// Get the "N"
var p = SElib.peek(vPtr);
// Convert "N" to "P"
SElib.poke(vPtr,p+2);
// Display "Pow"
TheApplication().Trace(v);
TheApplication().TraceOff();

This example produces the following output:

COMMENT,Now
COMMENT,Pow

Related Topics

For more information, see the following topics:

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