Okay I did it and got the result:fxm wrote:Did you do it?fxm wrote:Check your fbc version with:Code: Select all
Print __FB_Version__ Sleep
0.23.0
Okay I did it and got the result:fxm wrote:Did you do it?fxm wrote:Check your fbc version with:Code: Select all
Print __FB_Version__ Sleep
Wow! I learned something. Thank You fxm. Would this work also?fxm wrote:Each 'Sleep' keyword in the code waits a key is pressed to continue the code execution, but 'Sleep' does not clear the keyboard buffer and any key pressed during a call to 'Sleep' is retained and can then be read automatically by 'Input'.
In order to wait for a key press (due to 'Sleep' keyword), and then remove the key from the buffer, 'While InKey <> "" : Wend' can be placed after the 'Sleep' keyword.
(afterwards, a single 'Input' is enough)Code: Select all
Sleep While Inkey <> "" Wend Input ...
Code: Select all
DO: X5=GETKEY: LOOP UNTIL X5=27 OR X5=13 OR X5=32
So in fact you are compiling with the very old fbc 0.23 version, not the fbc 1.08.1 version as you might think.Triopstor wrote:Okay I did it and got the result:fxm wrote:Did you do it?fxm wrote:Check your fbc version with:Code: Select all
Print __FB_Version__ Sleep
0.23.0
It reminds me of the very old package: FBIde + FreeBASIC (FBIde 0.4.6r4 and FreeBASIC 0.23.0).fxm wrote:It is a change since fbc version 0.24.0:Triopstor wrote:Thank You fxm. I didn't notice that -- the semi-colons (;). Still the program by passes line 88. I think FreeBASIC accepts comma (,) delimiters.fxm wrote:In the 'Print Using' statement, the items to format must be separated by semi-colons (;).- PRINT USING now disallows commas between expressions (they had the same effect as semi-colons)
This will empty all characters in the keyboard input buffer until it finds one equal to 'ESC' or 'CR' or 'SP', but not subsequent ones if there are any.Triopstor wrote:Would this work also?
Code: Select all
DO: X5=GETKEY: LOOP UNTIL X5=27 OR X5=13 OR X5=32