Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
String Variables

String variables are represented by any variable with the suffix $, e.g. C$ or MYVAR$. They are stored as null-terminated C-style sequences of 8-bit ASCII characters.


Examples

name$ = "Retro Rocket"
PRINT "Hello, "; name$
REM Concatenate strings
first$ = "Hello"
second$ = "World"
PRINT first$ + " " + second$
REM Accessing characters
ch$ = LEFT$(name$, 1)
PRINT "First character = "; ch$

Notes

  • Strings are mutable and can be reassigned at any time.
  • Maximum length depends on available memory.
  • Operations such as concatenation (+), substring (LEFT$ / RIGHT$ / MID$), and trimming (TRIM$) are supported.
  • Null termination is internal — it is not visible during normal BASIC operations.

See also: Integer Variables · Real Variables · Array Variables