BASIC Stringlist Statements - fvdhoef/aquarius-plus GitHub Wiki

DEF BYTELIST

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 Quantity results 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.

APPEND BYTELIST

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.


DEF INTLIST

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.


APPEND INTLIST

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.


DEF RECTLIST

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.


APPEND RECTLIST

TYPE: plusBASIC v0.71h string statement

FORMAT: APPEND RECTLIST var$ = rectangle_list

Action: As above but appends to the end of the string list.

⚠️ **GitHub.com Fallback** ⚠️