blob <assign> {,<assign> ... }
Declare (and optionally assign) one or more blob variables. A blob is a block of binary data with user-defined contents.
<assign>
<ident> { = <value> }
<ident>
The name of the identifier.
<value>
A blob expression, typically a function returning a blob value.
None
If no assignment is supplied, a blob identifier is initialized to an empty block of data.
Once a blob has been assigned, it may be used within the language in the same context as a file, i.e. wherever a file parameter is expected a blob identifier may be used. However a blob expression, e.g. a function returning a blob, may not be used like this anf must be assigned to a blob identifier first.
When a string value containing a file name is required, and a blob is to be used for the file, the blob name may be preceded by 'blob:' and used instead of the file name. Note, the blob name must be valid in the command frame in which the string value is to be used.
Declare a new blob identifier, initialized with a length 0 bytes.
blob b
Declare 2 new blob identifiers, both initialized by assignment. The first blob is initialized to a block of 64 zero-filled bytes, the second blob is initialzed to a block of 4 bytes containing the ascii control characters CR, LF, CR, LF.
blob b1 = zeroblob(64), b2 = datablob(13,10,13,10)
Declare and initialize a blob array.
blob bs[] = <zeroblob(128),fileblob('c:/temp/mustang.jpg'),zeroblob(256)>
Creates an image as a blob, then uses it as an image within a panel window. Because the panel assignment requires a string value, we use the 'blob:' prefix. Note how the blob is declared before using a command which writes to it.
blob b rasdump b,-png,-iw=mygraphicwindow mywin.mypanel.image = 'blob:b'
Functions: |
datablob (blob), fileblob (blob), textblob (blob), zeroblob (blob) |
Structures: |