Files
five/examples/test_menu.prg
Charles KWON OhJun 59568f3301 Five v0.9 — Harbour + Go fusion language
- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline
- Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch
- RTL: 351 Harbour-compatible functions
- RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization
- Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec)
- HB_FUNC API: Full Harbour C API compatible Go bridge
- Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT
- Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST
- Macro Compiler: Runtime AST parsing and evaluation
- Debugger: TUI debugger with source display, breakpoints, stepping
- FRB: Native + Pcode dual mode runtime binary
- Tests: 13 packages ALL PASS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:41:50 +09:00

31 lines
714 B
Plaintext

// Test program for MENU TO / AChoice functions
// Calls __AtPrompt and __MenuTo directly (pp #command will add @ PROMPT syntax later)
FUNCTION Main()
LOCAL nChoice
CLS
SetCursor(0)
// Simple menu using __AtPrompt / __MenuTo
__AtPrompt(5, 10, "[ 1. Open File ]", "Open an existing file")
__AtPrompt(7, 10, "[ 2. Save File ]", "Save current file")
__AtPrompt(9, 10, "[ 3. Print ]", "Print document")
__AtPrompt(11, 10, "[ 4. Exit ]", "Exit the program")
SetPos(3, 10)
DevOut("Select an option:")
nChoice := __MenuTo(1)
CLS
SetCursor(1)
IF nChoice = 0
? "Cancelled (ESC)"
ELSE
? "You selected option:", nChoice
ENDIF
RETURN NIL