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])
The following table describes the 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
For more information, see the following topics: