4D v13.4

BLOB TO VARIABLE

Home

 
4D v13.4
BLOB TO VARIABLE

BLOB TO VARIABLE 


 

BLOB TO VARIABLE ( blob ; variable {; offset} ) 
Parameter Type   Description
blob  BLOB in BLOB containing 4D variables
variable  Variable in Variable to write with BLOB contents
offset  Longint in Position of variable within BLOB
in Position of following variable within BLOB

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.

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

 
PROPERTIES 

Product: 4D
Theme: BLOB
Number: 533

The OK variable is changed by the command

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D v6

 
SEE ALSO 

VARIABLE TO BLOB

 
TAGS 

Variable, Byteswapping***