Lasso Soft Inc. > Home

[Bytes]

[Bytes] creates a byte stream that can be used to work with binary data or to convert strings from one character set to another. The [Bytes] tag can be used to instantiate a new bytes object, or it can be used to cast string data types as bytes types. Only string data types may be cast as bytes data types.

The [Bytes] tag has two optional parameters. The first specifies the size of the memory buffer in bytes that should be allocated to hold the byte stream. The second specifies the number of bytes that should be added if the initial memory buffer is too small to hold the entire byte stream.

Note that the [Bytes] tag does not accept the data of the byte stream directly. The data is imported into the byte stream using the [Bytes->Append] or [Bytes->Import...] tags.

  • Syntax
  • Parameters
<?LassoScript
Var: 'Bytes1' = (Bytes: 'String Value');
Var: 'Bytes2' = (Bytes: 1024, 256);
...
?>
Required Parameters
Buffer Size The initial size of the buffer for the byte stream in bytes.
Grow Size The increment in bytes to grow the byte stream buffer.
Examples

See the Lasso 8 Language Guide for examples of how to use this tag. This tag is documented on page 92.

Tag Link [Bytes] Category Technical
Type Substitution Data Source Any
Support Preferred Version 7.0
Output Type Bytes Security None
Implementation Sets Lasso 7.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft