Post Reply 
Social Buttons
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No LookUp for Variable
11-12-2018, 11:19 PM
Post: #1
No LookUp for Variable
'no lookup variable
string token[10] ' token array
int tokType[10] ' token type array
int typeOfToken = 0
int id[10] ' ID array
int idx=0 ' index as integer number
float numVar[10] ' array which hold values of variables

'when tokenizer extract token
'store members/parameters of variable
idx++ ' increase index to 1
token[idx] = "a" ' token - string variable
tokType[idx] = 1 ' stored as numeric var(1)
id[idx] = idx ' id of variable stored as index
'check token type
if tokType[id] = 1 ' numeric var is 1
'get value directly...
value = GetNumVar( numVar[id] )
end if

'when interpreter read token from token array
'then he also read id of token/variable
'read token "a" : read token id -> 1

'on id 1 there is variable 'a' with value 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: