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

Siebel Library Write Data Method


The Siebel Library Write Data method writes data to a specific position in memory. It returns the address of the byte that immediately follows the data that it writes.

CAUTION:  If your code directly accesses memory, then you must use this code with caution. To avoid moving data unexpectedly, you must clearly understand how the Siebel Library Write Data method affects memory.

Format

SElib.poke(address, data[, dataType])

Table 122 describes the arguments for the Siebel Library Write Data method.

Table 122. Arguments for the Siebel Library Write Data Method
Argument
Description

address

The starting address in memory where this method writes data.

data

The data that this method writes in memory. The data type of this data must match the type that you specify in the dataType argument.

dataType

For more information, see Table 121.

Example

The following example includes the Siebel Library Write Data 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.