Files
gw-basic-2026/tests/programs/variables.bas
Eremey Valetov 616259537a Phase 2: variables, arrays, program execution, and control flow
Add variable storage (scalar and array), program line storage with
RUN/LIST/NEW, and full control flow: FOR/NEXT, GOTO, GOSUB/RETURN,
IF/THEN/ELSE, WHILE/WEND, ON GOTO/GOSUB, DATA/READ/RESTORE.

New modules: interp.c (1445 lines - execution loop and statement
dispatcher), vars.c, arrays.c, input.c. Version bumped to 0.2.0.
16 test programs pass including Leibniz pi and prime sieve.
2026-02-10 11:16:58 -05:00

12 lines
176 B
QBasic

10 REM Variable types test
20 A% = 42
30 B! = 3.14
40 C# = 2.718281828
50 D$ = "Hello"
60 PRINT A%; B!; C#
70 PRINT D$
80 REM DEFINT test
90 DEFINT X-Z
100 X = 7.9
110 PRINT X