arrays, relational expressions

arrays, relational expressions


array Index Level !
Syntax
Category BASIC
Type Definition
Description a brief discussion of referencing arrays in FlashBASIC and the use of the special "wildcard" array searching character.

Individual elements of dimensioned and dynamic arrays are compared in relational expressions using the standard syntax. All elements of the array can be compared to a specified value by using an "*" (asterisk) to identify the element.

In multi-dimensioned arrays, one or more dimensions can be specified using the example.  When the asterisk is used, the operators "<", ">", "=", "<=", ">=" and "#" return a true value if at least one element of the array satisfies the relation. The asterisk may be specified only in relational expressions and only in one array expression in a statement.
Options
See Also DIM assignment array.variable *
Example dim a(10)
if a(*) = "x" then ....

This compares all elements in the dimensioned array "a" to the value "x".  If any element equals "x", the "then" statement is performed.

if s<*> >= "10" then....

Checks that any element in the dynmaic array "s" is greater-than or equal to "10".

dim a(10,10)
if a(*,*)<*,*,*> = "x" then....

Checks every attribute, value, and subvalue in every string in the dimensioned array "a".
Warnings
Compatibility D3 7.0 AP R83
array Index Level !