// 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