Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
INKEY$ doesn't work with fixed length strings
#1
As an addendum to my prior post. https://qb64phoenix.com/forum/showthread.php?tid=2889

If I attempt to use INKEY$ with a fixed length string I get no values.

Here is an example:

Code: (Select All)
TYPE tt
' Use 2 bytes to capture 2 byte combinations
'k AS STRING ' Works
k AS STRING * 2 ' Does Not work
END TYPE

DIM AS tt t

DO
t.k = INKEY$
LOCATE 1, , 1
PRINT "k:"; t.k
LOOP

It doesn't appear to matter how many bytes I allocate, It does not work.

I know there are many workarounds, like using _KEYHIT, or not using fixed length strings.

Again, I'm on Linux using QB64pe v3.13
Reply


Messages In This Thread
INKEY$ doesn't work with fixed length strings - by justsomeguy - 07-28-2024, 03:57 PM



Users browsing this thread: 17 Guest(s)