BASIC: string arrays (DIM A$(n), one or two subscripts)
Elements hold up to 79 characters, 80 bytes each, at most 255 per array; undeclared ones get 0..10 like numeric arrays. All string-variable uses now go through one str_ref(), which more than pays for the feature in ROM. The arena gives up 156 bytes for the larger array table so nothing after it moves. Adds basic/test-strarr.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2d1be15786
commit
c553824df0
7 files changed
+2269
-2170
No files matched your search
@@ -212,7 +212,7 @@ to copy that program line one character at a time, or End to copy all of it.
|
||||
- Numbers: a letter or a letter and digit (`X`, `A1`), single-precision
|
||||
floating point.
|
||||
- Arrays: one letter, one or two subscripts from 0, 10 by default.
|
||||
- Strings: `A$`..`Z$`, up to 79 characters.
|
||||
- Strings: `A$`..`Z$`, up to 79 characters; string arrays `A$(n)` likewise.
|
||||
- **Operators**: `+ - * / ^`, `= <> < > <= >=`, `AND OR NOT`.
|
||||
- **Functions**:
|
||||
- Numeric: `SIN COS TAN ATN EXP LOG ABS SQR INT RND SGN`, `FNx`
|
||||
@@ -222,7 +222,7 @@ to copy that program line one character at a time, or End to copy all of it.
|
||||
- Spaces are optional, as at Dartmouth: `FORI=1TO10` works.
|
||||
- `DATA` takes the rest of its line.
|
||||
|
||||
About 20.3 KB of program space is free; F000h-F3F7h is kept free for machine code.
|
||||
About 20.2 KB of program space is free; F000h-F3F7h is kept free for machine code.
|
||||
|
||||
**Graphics:** the layer is 320×240 pixels in the 16 terminal colours, each
|
||||
pixel a 4×4 block, with (0,0) at the top left. Colour 0 is transparent. Text is
|
||||
|
||||
Reference in new issue
Block a user