WHAT?

Blitz3D Forums/Blitz3D Beginners Area/WHAT?

Ben(t)(Posted 2007) [#1]
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?


Moraldi(Posted 2007) [#2]
Is this necessary?


LineOf7s(Posted 2007) [#3]
Short answer: no.

You get a big fat "Function 'do' not found" compilation error.


GfK(Posted 2007) [#4]
No you can't do it.

You also can't use a float with KeyHit.


Beaker(Posted 2007) [#5]
It's worth mentioning (in case you move over to BlitzMax): You can pass function pointers to other functions in BlitzMax. :)


Ben(t)(Posted 2007) [#6]
okay thanks for the info


thelizardking(Posted 2007) [#7]
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.


Ben(t)(Posted 2007) [#8]
ahh sorry I'm new at all this