Syntax:
|
BufSetAlpha(variable reference, position, value, storage, length, value as pointer)
|
Parameters:
|
variable reference – The reference to the BLOB variable containing the buffer. For example, 'A'VAR
position – The numeric value defining where the conversion result will be placed in the BLOB value.
value – The value to be set.
storage – A numeric value representing a valid storage type in Magic xpa. For a list of storage types, see Magic xpa Storage Types.
length – A numeric value representing the length of the Alpha value.
value as pointer – A logical value indicating if the Alpha value should be written directly to the buffer or as a pointer to the data. If you enter True, Magic xpa sets the BLOB with a pointer to the Alpha value. In this case, the data will consume four bytes of the BLOB. Use pointers if the buffer should receive a string with no size defined.
|
Example:
|
The following example inserts the value 'my-string' to the buffer, starting from the first byte to the ninth byte, followed by two pointers to the 'dynamic-string1' and 'dynamic-string2' strings:
BufSetAlpha('A'VAR,1,'my-string',1,9,'FALSE'LOG)
BufSetAlpha('A'VAR,10,'dynamic-string1',1,15,'TRUE'LOG)
BufSetAlpha('A'VAR,14,'dynamic-string2',1,15,'TRUE'LOG)
|