LOOKUPSTR

Top  Previous  Next

Action

Returns a string from a table.

 

 

Syntax

var =LOOKUPSTR( value, label [, language , length])

 

 

Remarks

var

The string returned

value

A value with the index of the table. The index is zero-based. That is, 0 will return the first element of the table.

label

The label where the data starts

language

An optional variable that holds a number to identify the language. The first language starts with the number 0.

length

The length of the data for each language.

value :  Byte, Integer, Word, Long, Constant. Range(0-255)

 

See also

LOOKUP

 

 

Example

Dim S As String * 8 , Idx As Byte

Idx = 0 : S = Lookupstr(idx , Sdata)

Print S                                   'will print 'This'

End

 

Sdata:

Data "This" , "is" , "a test"

 

 

 

Example 2

Dim S As String * 8 , Idx As Byte , Language As Byte

Idx = 0 : Language = 1

S = Lookupstr(idx , Sdata , Language , 17)

Print S                                   ' will print 'Dit '

End

 

Sdata:

Data "This" , "is" , "a test  " 'each language data must have the same length

Data "Dit " , "is" , "een test" 'the length is 17 because strings include a 0  byte