24.09.2025, 07:39 AM
(23.09.2025, 03:16 PM)Dale Yarker Wrote: From FreeBASIC Help for SLEEP: "Waits until a specified time has elapsed, or a key is pressed."
Aha, never would have looked there (PB bias).
On relection, makes sense. If no key press give clock cycles back till next time slice for this app.
Think I'll save INKEY in a loop for getting particular keys.
"File / Preferences / Environment Options / Compiler Setup / "Run compiled programs using the command window"" Good to know. Isn't it specific to tiko, not general to FreeBASIC?
big thanks
(sure I'll run into something else)
Interested in GUI too.
If can't do a "Hello World" in console, figured no chance in GUI.
In addition to SLEEP, ChatGPT points to GETKEY:
Option 2: Using
Code:
GetKey
Print "Press any key to exit..."
Dim k As Integer = GetKey() ' Waits for a key and stores it in k
GetKey reads a keypress and returns its ASCII code (or scan code for special keys).
This is useful if you want to know which key was pressed.
--
New PowerBASIC User Community Forum:
https://pbusers.org/forum
New PowerBASIC User Community Forum:
https://pbusers.org/forum