BLOB TO VARIABLE

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0


BLOB TO VARIABLE (blob; variable{; offset})

ParameterTypeDescription
blobBLOBBLOB containing 4D variables
variableVariableVariable to write with BLOB contents
offsetNumberPosition of variable within BLOB
Position of following variable within BLOB

Description

The BLOB TO VARIABLE command rewrites the variable variable with the data stored within the BLOB blob at the byte offset (starting at zero) specified by offset.

The BLOB data must be consistent with the destination variable. Typically, you will use BLOBs that you previously filled out using the command VARIABLE TO BLOB.

If you do not specify the optional offset parameter, the variable data is read starting from the beginning of the BLOB. If you deal with a BLOB in which several variables have been stored, you must pass the offset parameter and, in addition, you must pass a numeric variable. Before the call, set this numeric variable to the appropriate offset. After the call, that same numeric variable returns the offset of the next variable stored within the BLOB.

After the call, if the variable has been successfully rewritten, the OK variable is set to 1. If the operation could not be performed, the OK variable is set to 0; for example, if there was not enough memory.

Note regarding Platform Independence: BLOB TO VARIABLE and VARIABLE TO BLOB use a 4D internal format for handling variables stored in BLOBs. As a benefit, you do not need to worry about byte swapping between platforms while using these two commands. In other words, a BLOB created on Windows using either of these commands can be reused on Macintosh, and vice-versa.

Example

See the examples for the command VARIABLE TO BLOB.

See Also

VARIABLE TO BLOB.

System Variables or Sets

The OK variable is set to 1 if the variable has been successfully rewritten, otherwise it is set to 0.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next