Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel eScript Language Reference > Methods Reference > Buffer Methods > Put Value in Buffer MethodThe Put Value in Buffer method replaces existing data in a buffer with a value that you specify. It replaces data starting at the current position of the cursor. It puts the value that the buffer contains at the current cursor position, and then automatically increments the cursor value by the value that the value argument contains. To put a value at a specific position and preserve the cursor position, you can add code that is similar to the following: var oldCursor = bufferItem.cursor; // Save the cursor position For more information, see Usage of the Term Put. FormatbufferVar.putValue(value[, valueSize][, valueType ]) Table 58 describes the arguments for the Put Value in Buffer method.
Avoiding Digit LossTo put the value in the buffer, the Put Value in Buffer method uses byte ordering according to the current value that the bigEndian argument contains. If it puts a smaller float value, such as 4, then digits are lost. It converts a value such as 1.4 to a value that is approximately 1.39999974. This conversion is insignificant and you can ignore it. bufferItem.putValue(1.4,8,"float"); To prevent this situation, you can set the valueSize argument to 8 instead of 4. You can use a valueSize of 4 for a floating-point value, but be aware that some digit loss might occur. This loss might not be significant enough to affect most calculations. |
![]() ![]() |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |