Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input to asci
#11
Well, you don't need to split the cases. A raw select case would work and will be faster:

Code:
k$=INKEY$
SELECT CASE k$
   CASE "p": ' key p
   CASE CHR$(0)+CHR$(75): ' cursor left.
END SELECT

Simpler code. Also if you are an optimization freak it is better to precalculate stuff:

Code:
CursorLeft$=CHR$(0) + CHR$(75)
...
k$=INKEY$
SELECT CASE k$
   CASE "p": 'key p
   CASE CursorLeft$: 'cursor left
END SELECT
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#12
true, but I find it easier to work with just numbers....
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)