
6.MACRO EXECUTOR FUNCTION B-63943EN-2/01
- 268 -
6.16 FUNCTION FOR SEARCHING DATA TABLES FOR
CONTROL VARIABLES
This function searches a data table, which contains sets of consecutive
control variables, for a control variable that satisfies a specified
condition. If it finds the target control variable, it returns the data
table set number where the target control variable is contained.
The function can read the following data:
Format
Input
#8650 : Start control variable number in the search target data table
(setting: 1 or greater)
#8651 : The number of macro variables that forms a set in the data table
(setting: 1 or greater)
#8652 : The number of search target data table sets
(setting: 1 or greater)
#8653 : Lower limit to the search value
(sign and decimal point can be entered)
#8654 : Upper limit to the search value
(sign and decimal point can be entered)
G400 : Search execution
(searches for control variable X that satisfies: #8653
≤ X ≤ #8654)
Output
#8655 : The data table set number where a control variable that satisfies
the search condition is contained (0 or greater), or
= -1 : There is no control variable that satisfies the condition.
= -2 : The setting of any of #8650 to #8652 is invalid (0 or less
has been set).
= -3 : #8653
≤ #8654 is not satisfied.
#8650 : Start control variable number in the set next to the retrieved data
table set number (#8655)
#8652 : Set value minus the number of sets that have already been
retrieved
NOTE
1 If #8655 = -1:
#8650 = 1 (next control variable number in the
search target data table)
#8652 = 0
2 The set number begins with 0, but the minimum
value of #8652 (the number of search data table
sets) is 1.
3 If more than one control variable satisfies the
search condition, a search ends by returning the
data table set number that contains the first control
variable to be found.
4 Only #8655 is a read-only variable.