BASIC Stringlist Statements - fvdhoef/aquarius-plus GitHub Wiki
TYPE: plusBASIC string statement
FORMAT: DEF BYTELIST var$ = byte_list
Action: Creates a string list of 8-bit numbers.
- var$ is a simple string variable.
- byte_list is a series of numeric expressions separated by commas.
- Each number will be stored as one character, making the resulting string length the same as that of the list.
- Error 5,
Illegal Quantityresults if number is not in the range -256 through 255. - Numbers less than 0 are treated as twos-complement, resulting in binary value of 256 + number.
TYPE: plusBASIC v0.27i string statement
FORMAT: APPEND BYTELIST var$ = byte_list
Action: As DEF BYTELIST but appends to the end of the string list.
TYPE: plusBASIC system statement_t
FORMAT: DEF INTLIST var$ = integer_list
Action: Creates a binary string of two byte integers in LSB, MSB order,.
- var$ is a simple string variable.
- integer_list is a series of numeric expressions separated by commas
- The length of the string will be the number of integers times 2.
- Numbers less than 0 are treated as twos-complement, resulting in binary value of 65536 + number.
Examples
DEF INTLIST A$ = -1, 1, 32768
Creates a binary string consisting of the integers 65535, 1, 32768.
TYPE: plusBASIC v0.27i string statement
FORMAT: APPEND INTLIST var$ = byte_list
Action: As DEF INTLIST but appends to the end of the string list.
TYPE: plusBASIC v0.71h string statement
FORMAT: DEF RECTLIST var$ = rectangle_list
Action: Creates a binary string containing a series rectangle coordinates.
- var$ is a simple string variable.
-
rectangle_list is a series coordinate sets separated by semicolons.
- Each coordinate set has the syntax x1 , y1 , x2 , y2.
- The length of the string will be the number of coordinate sets times 8.
Examples
DEF RECTLIST R$ = 5,7,10,11;20,30,40,50
Creates a binary string consisting of two rectangles.
TYPE: plusBASIC v0.71h string statement
FORMAT: APPEND RECTLIST var$ = rectangle_list
Action: As above but appends to the end of the string list.