Revision history for KeyPgSleep


Revision [21140]

Last edited on 2016-03-13 10:56:57 by fxm [Formatting]
Additions:





Revision [20528]

Edited on 2016-02-10 16:08:51 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgSub|sub]] **Sleep** ( [[KeyPgByval|byval]] //amount// [[KeyPgAs|as]] [[KeyPgLong|long]] = -1 )
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Sleep** ( [[KeyPgByval|byval]] //amount// [[KeyPgAs|as]] [[KeyPgLong|long]] , [[KeyPgByval|byval]] //keyflag// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgLong|long]]
##**Sleep**## will wait until ##//amount//## milliseconds (can be seconds in //[[CompilerOptlang|-lang qb]]//, see below) given elapsed (if any value was passed) or until the user presses a key. If ##//amount//## is below 100 ms then ##**Sleep**## will always wait the full requested amount (key presses are ignored).
##**Sleep**## does not clear the keyboard buffer and any keys pressed during a call to ##**Sleep**## are retained and can be read using ##[[KeyPgInkey|Inkey]]##. In order to wait for a key press, and remove the key from the buffer, ##[[KeyPgGetkey|Getkey]]## can be used instead.
- In the //[[CompilerOptlang|-lang fb]]// and //[[CompilerOptlang|-lang fblite]]// dialects, the ##//amount//## value is in **milliseconds**.
- In the //[[CompilerOptlang|-lang qb]]// dialect, the ##//amount//## value is in **seconds** as in QB. If the second parameter ##//keyflag//## is given, or the keyword is written as ##**""__Sleep""**## the value is expected to be in **milliseconds**.
- None in the //[[CompilerOptlang|-lang qb]]// dialect.
- ##[[KeyPgTimer|Timer]]##
- ##[[KeyPgInkey|Inkey]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] = -1 )
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgLong long]] ) [[KeyPgAs as]] [[KeyPgLong long]]
##**Sleep**## will wait until ##//amount//## milliseconds (can be seconds in //[[CompilerOptlang -lang qb]]//, see below) given elapsed (if any value was passed) or until the user presses a key. If ##//amount//## is below 100 ms then ##**Sleep**## will always wait the full requested amount (key presses are ignored).
##**Sleep**## does not clear the keyboard buffer and any keys pressed during a call to ##**Sleep**## are retained and can be read using ##[[KeyPgInkey Inkey]]##. In order to wait for a key press, and remove the key from the buffer, ##[[KeyPgGetkey Getkey]]## can be used instead.
- In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the ##//amount//## value is in **milliseconds**.
- In the //[[CompilerOptlang -lang qb]]// dialect, the ##//amount//## value is in **seconds** as in QB. If the second parameter ##//keyflag//## is given, or the keyword is written as ##**""__Sleep""**## the value is expected to be in **milliseconds**.
- None in the //[[CompilerOptlang -lang qb]]// dialect.
- ##[[KeyPgTimer Timer]]##
- ##[[KeyPgInkey Inkey]]##


Revision [17685]

Edited on 2015-06-12 06:05:53 by FxMwikki [Suppressed the no-relevant keyword 'Overload' in Syntax]
Additions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] = -1 )
Deletions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] = -1 )


Revision [17555]

Edited on 2015-04-01 13:08:04 by DkLwikki [integer => long]
Additions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] = -1 )
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgLong long]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgLong long]] ) [[KeyPgAs as]] [[KeyPgLong long]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 )
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]


Revision [16307]

Edited on 2012-08-18 18:53:59 by CountingPine [Sleep(amount, keyflag) is not a sub but a function]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
//result// = **Sleep** ( //amount//, //keyflag// )
Optional flag; give it a value of ##0## for a normal sleep, or ##1## to specify that the wait cannot be interrupted by a key press.
{{fbdoc item="ret"}}
Returns ##1## if ##//keyflag//## was not a valid value (i.e. something other than ##0## or ##1##) to indicate failure, or ##0## otherwise.
Deletions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgInteger integer]] )
Optional flag; give it a value of ##1## to specify that the wait cannot be interrupted by a key press.


Revision [16304]

Edited on 2012-08-18 07:13:52 by CountingPine [Sleep is not a function but a sub]
Additions:
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 )
[[KeyPgDeclare declare]] [[KeyPgSub sub]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgInteger integer]] )
Optional flag; give it a value of ##1## to specify that the wait cannot be interrupted by a key press.
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //keyflag// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
Optional flag; give it a value of 1 to specify that the wait cannot be interrupted by a key press.


Revision [12943]

The oldest known version of this page was created on 2008-04-18 15:16:50 by AntoniGual [Sleep is not a function but a sub]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode