is this possible?
while not keyhit(2)
what(1,End)
wend
Function what(key#,do)
If KeyHit(key#) Then
do
EndIf
End Function
can you actually type in commands to a function like this?
Short answer: no.
You get a big fat "Function 'do' not found" compilation error.
No you can't do it.
You also can't use a float with KeyHit.
It's worth mentioning (in case you move over to BlitzMax): You can pass function pointers to other functions in BlitzMax. :)
well KeyHit returns an intager, not a decimal (floating point), and you cant assign functions to variables. that would come in handy though. and not to sound like these grumbly old farts here, but you should make your title more descriptive.
ahh sorry I'm new at all this