Gentee Programming Language > Documentation > Syntax Download documentation

Binary Data

Binary data are surrounded by single quotation marks '. The basic elements of binary data are numbers represented in decimal or hexadecimal notation and the string. The numbers can be separated by spaces, commas and line-feeds.

You must use the escape sequances, as listed below, begining with a backslash '\' to define different types of data.
 
\"string"The string insertion. Actually, you can follow all the rules of the string description in order to deal with the string. It is important to note that the Null character is not appended to the end of a string. The Null character is appended if the string is enclosed in parentheses \("string").
\[comments]A comment insertion.
\(...)A result expression is inserted. An expression of any type enclosed in parentheses is to be converted into the binary data.
\hInsertion mode of numbers in hexadecimal notation. The numbers 2, 4, 8, are followed then, which indicate the total number size in bytes. If the number size is not specified, numbers are considered to be bytes. Keep in mind that hex digits are read in byte-read mode by default.
\iThe read mode of decimal numbers. Numbers can be represented in floating-point notation in this mode. The size number of 2, 4 or 8 can also be indicated after i.
\$macro$Macro value is inserted into the binary data. If the last sign '$' is followed by neither a digit nor a letter, it is considered to be optional.
\$"string"A macro string is inserted into the binary data.
\<file>Contents of the required file is inserted. A file name enclosed within angle brackets must be written as a macro string, i.e. the command character is ignored.

'5 \(50 + 45) afdcCCAB FF \[ comments ]
 \h 567, 12 ; \"string" 45 \i4 255 3 +356 -1 45.56'

You can use buf type for describing the binary data variable. You can find binary data methods and operations in Standard Library-Buffer.

<const binary data element> ::= '\h'<space> [ ( '2' | '4' | '8' ) <space>] | '\i'<space> [ ( '2' | '4' | '8' ) <space>] | <hexadecimal digit> {<hexadecimal digit>} { (<space> | ',' | <end-of-line>) <hexadecimal digit> {<hexadecimal digit>} } | <integer number> { (<space> | ',' | <end-of-line>) <integer number> } | '\'<const string> | '\[' {<any character>}']' | '\$'<macro name>'$' | '\$"' {<macrostring element>} '"' | '\<'{<macrostring element>}'>'
<binary data element> ::= <const binary data element> | '\('<expression>')'
<const binary data> ::= ''' {<const binary data element>} '''
<binary data> ::= ''' {<binary data element>} '''


 Copyright © 2004-2006 Gentee Inc. All rights reserved.