For a console application I want to issue a prompt:
"Press any key to continue ..."
or
"Press 'X' to exit or 'C' to continue:"
and then wait for the user to press a key.

I can find no equivalent for the Basic "inkey" function. I have tried 
using wait/read but it seems one must press the "enter" key.
Private Function InKey(Prompt As String) As Byte
   Dim n As Byte
   If Prompt <> "" Then Print Prompt
   n = 0
   While n = 0
     Wait 0.01
     ' n = Read As Byte
     n = Read 1
   Wend
   Return n
End

Suggestions ?

Lewis



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to