11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.38. LOOKDOWNLSyntax : Variable = LOOKDOWNL Index , {Operator} [ Value { , Value…etc } ]Overview : A comparison is made between index and value; if the result is true, 0is written into variable. If that comparison was false, another comparisonis made between value and value1; if the result is true, 1 is writteninto variable. This process continues until a true is yielded, atwhich time the index is written into variable, or until all entries are exhausted,in which case variable is unaffected.Operators :Variable is a user define variable that holds the result of the search.Index is the variable/constant being sought.Value(s) can be a mixture of 16-bit constants, string constants andvariables. A maximum of 50 values may be included in the list. Expressionsmay not be used in the Value list, although they may beused as the index value.Operator is an optional comparison operator and may be one of thefollowing: -= equal not equal> greater than< less than>= greater than or equal to” as the operator. If operator is left out, “=” is assumed.Example : Var = LOOKDOWNL Wrd , [ 512 , Wrd1 , 1024 ]Var = LOOKDOWNL Wrd , < [ 10 , 100 , 1000 ]Notes :See also :Because LOOKDOWNL is more versatile than the standard LOOK-DOWN command, it generates larger code. Therefore, if the searchlist is made up only of 8-bit constants and strings, use LOOKDOWN.LOOKDOWN, LOOKUP, LOOKUPL75Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!