Numeric Tables

OPERAND 1

OPERATOR

OPERAND 2

RESULT

 

SEARCH

TABLA_XXXX

 

This operator searches the numeric table indicated in the operand 2. OBSERVATION: it is not placed in any record. Operand 2 must be made of the word TABLA_ plus the type (U if is user, S, if it is System) and the 4-digit table key.

ELEMENTO_01 to ELEMENTO_99

HASTA_IGUAL

N, C, F

 

ELEMENTO_01 to ELEMENTO_99

HASTA_MAYOR

N

 

ELEMENTO_01 a ELEMENTO_99

HASTA_MENOR

N

 

ELEMENTO_01 a ELEMENTO_99

HASTA_MAYORIGUAL

N

 

ELEMENTO_01 a ELEMENTO_99

HASTA_MENORIGUAL

N

 

Searches the table (previously called with operator SEARCH) until the indicated element in operand 1 is equal to, greater than, equal to or greater then, smaller than, equal to or smaller than the mnemonic indicated in operand 1. If it is not found, the record returns with zeros. To use the operators HASTA_MENOR and HASTA_MENORIGUAL the table must be captured in a descending manner. That is, higher values come in the first records and lower in the last.

NOTE: the records must be captured in order, as, in the alphanumeric tables, different types of tables can be defined with different data types and sizes, you cannot organize an index.

 

For example: Get the tax according to article 113 of LISR.

Operand 1

Operator

Operand 2

Result

PERGRAVMES

SI_IGUAL

0

FIN

 

SEARCH

TABLA_01

 

ELEMENTO_02

HASTA_MAYOR

PERGRAVMES

 

PERGRAVMES

RESTA

ELEMENTO_01

NAUX_01

NAUX_01

MULTIPLY

ELEMENTO_04

NAUX_01

NAUX_01

SUMA

ELEMENTO_03

NAUX_01

 

SEARCH

TABLA_03

 

ELEMENTO_02

HASTA_MAYOR

PERGRAVMES

 

NAUX_01

RESTA

ELEMENTO_03

IMPORTE

IMPORTE

SI_MAYOR

0

CONTINUE

 

MUEVE

IMPORTE

Credit

 

MUEVE

0

IMPORT

CONTINUE

LABEL

 
 

IMPORT

SUMA

TOTDED

TOTDED

FIN

LABEL