// Test program for AChoice function FUNCTION Main() LOCAL aItems, nChoice aItems := {"Apple", "Banana", "Cherry", "Date", "Elderberry", ; "Fig", "Grape", "Honeydew", "Kiwi", "Lemon", ; "Mango", "Nectarine", "Orange", "Papaya", "Quince"} CLS SetCursor(0) SetPos(0, 0) DevOut("Select a fruit (ESC to cancel):") nChoice := AChoice(2, 5, 12, 30, aItems) CLS SetCursor(1) IF nChoice = 0 ? "Cancelled" ELSE ? "You selected:", aItems[nChoice] ENDIF RETURN NIL