4D v16.3

LIST TO BLOB

Home

 
4D v16.3
LIST TO BLOB

LIST TO BLOB 


 

LIST TO BLOB ( list ; blob {; *} ) 
Parameter Type   Description
list  ListRef in Hierarchical list to store in the BLOB
blob  BLOB in BLOB to receive the Hierarchical list
Operator in * to append the value

The LIST TO BLOB command stores the hierarchical list list in the BLOB blob.

If you specify the * optional parameter, the hierarchical list is appended to the BLOB and the size of the BLOB is extended accordingly. Using the * optional parameter, you can sequentially store any number of variables or lists (see other BLOB commands) in a BLOB, as long as the BLOB fits into memory.

If you do not specify the * optional parameter, the hierarchical list is stored at the beginning of the BLOB, overriding its previous contents; the size of the BLOB is adjusted accordingly.

Wherever the hierarchical list is stored, the size of the BLOB will be increased if necessary according to the specified location (plus up to the size of the list if necessary). Modified bytes (other than the ones you set) are reset to 0 (zero).

WARNING: If you use a BLOB for storing lists, you must later use the command BLOB to list for reading back the contents of the BLOB, because lists are stored in BLOBs using a 4D internal format.

After the call, if the list has been successfully stored, 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: LIST TO BLOB and BLOB to list use a 4D internal format for handling lists stored in BLOBs. As a benefit, you do not need to worry about byte swapping between platforms when using these two commands. In other words, a BLOB created on Windows using those commands can be reused on Macintosh, and vice-versa.

Example  

See example for the command BLOB to list.



See also 

BLOB to list
BLOB TO VARIABLE
SAVE LIST
VARIABLE TO BLOB

 
PROPERTIES 

Product: 4D
Theme: BLOB
Number: 556

The OK variable is changed by the command

 
HISTORY 

Created: 4D v6

 
TAGS 

List, Hierarchical List

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)