Add OPEN/CLOSE with both modern (OPEN "f" FOR OUTPUT AS #n) and compact (OPEN "O",#n,"f") syntaxes. PRINT#, WRITE#, INPUT#, LINE INPUT# for sequential file access. EOF() now returns real file status with peek-ahead. LOC/LOF return approximate values. PRINT USING with numeric (#, ., +, -, $$, **, ^^^^, comma grouping) and string (!, &, \ \) format specifiers. Shared by PRINT USING and PRINT# USING. SAVE (ASCII), LOAD (with ,R auto-run), and MERGE for program persistence. MID$ assignment (MID$(var$, start [,len]) = expr) for in-place string modification. Works with both scalar variables and array elements. Graphics stubs for SCREEN, PSET, PRESET, LINE, CIRCLE, DRAW, PAINT, VIEW, WINDOW, PALETTE - parse and discard arguments so graphics-heavy programs don't crash. SYSTEM and NEW/CLEAR now close all open files. Version bumped to 0.3.0. 22 tests pass (16 existing + 6 new).
10 lines
199 B
QBasic
10 lines
199 B
QBasic
10 REM Graphics stubs test
|
|
20 SCREEN 2
|
|
30 PSET(10,20),3
|
|
40 PRESET(50,50)
|
|
50 LINE (0,0)-(100,100),1
|
|
60 CIRCLE(160,100),50,2
|
|
70 DRAW "U10 R10 D10 L10"
|
|
80 PAINT (50,50),1,2
|
|
90 PRINT "Graphics stubs OK"
|