LOOKUP

Top  Previous  Next

Action

Returns a value from a table.

 

 

Syntax

var =LOOKUP( value, label )

 

 

Remarks

var

The returned value

value

A value with the index of the table

label

The label where the data starts

var :  Byte, Integer, Word, Long, Single.

value :  Byte, Integer, Word, Long, Constant.

 

 

 

See also

LOOKUPSTR

 

 

Example

Dim B1 As Byte , I As Integer

B1 = Lookup(1 , Dta)

Print B1                                 ' Prints 2 (zero based)

 

I = Lookup(0 , Dta2)

End

 

 

Dta:

Data 1 , 2 , 3 , 4 , 5

 

Dta2:                                     'integer data

Data 1000% , 2000%