Files
gw-basic-2026/tests/programs/invoice.bas
Eremey Valetov 1f4c460f4f Phase 5: CI, terminal I/O, Sixel graphics, classic programs
Add GitHub Actions CI with automated build and test. Implement real
terminal I/O with raw mode (enable_raw/disable_raw, proper INKEY$
polling via VMIN=0/VTIME=0, INPUT$ function). Add Sixel graphics
engine with virtual framebuffer (SCREEN 1: 320x200, SCREEN 2:
640x200), Bresenham line drawing, midpoint circle, flood fill PAINT,
DRAW mini-language parser, and Sixel encoder with RLE. Replace all
graphics stubs with real implementations (PSET, LINE, CIRCLE, DRAW,
PAINT, COLOR, SCREEN, POINT). Fix AND/OR/XOR operator precedence
to be lower than relational operators. Add 13 classic test programs
(39 total). Bump version to 0.5.0.
2026-02-10 16:46:34 -05:00

24 lines
765 B
QBasic

10 REM Invoice with PRINT USING formatting
20 PRINT "================================"
30 PRINT " INVOICE"
40 PRINT "================================"
50 PRINT ""
60 DATA "Widget A",12,4.99
70 DATA "Widget B",5,12.50
80 DATA "Gizmo C",3,29.99
90 DATA "Part D",100,0.75
100 DATA "END",0,0
110 TOTAL = 0
120 PRINT "Item Qty Price Amount"
130 PRINT "------------- --- ------- ---------"
140 READ ITEM$, QTY%, PRICE
150 IF ITEM$ = "END" THEN 190
160 AMT = QTY% * PRICE
170 TOTAL = TOTAL + AMT
180 PRINT USING "\ \### $$#,###.## $$#,###.##"; ITEM$; QTY%; PRICE; AMT
185 GOTO 140
190 PRINT " ---------"
200 PRINT USING " Total: $$#,###.##"; TOTAL
210 PRINT ""
220 PRINT "Invoice OK"