📖⚡LOOKDOWN

Obtains the first POSITION of a VALUE in lookup table

 If the lookup value is not found then the result variable is not modified.

Syntax

LOOKDOWN ByteValue , (ByteValue0 , ByteValue1 .. ByteValueN) , ResultVariable

Example

LOOKDOWN B0 , (3, 0 , 4, 1 , 5 , 2) , B1


 

' LOOKDOWN Example
' LookDown.txt
' Kic8

' Find each letter position
' The result will be in B1

FOR B0 = "A" TO "D"

  LOOKDOWN B0 , ("ABCDEFG"), B1
  PAUSE 1000

NEXT

END

Related commands: