The OPTMODEL Procedure

OR Aggregation Expression

OR{ index-set } logic-expression

The OR aggregation operator evaluates the logical expression logic-expression for each member of the index set index-set. The index set enumeration finishes early if the logic-expression evaluation produces a true value (nonzero and nonmissing). The result is 1 if a true value is found, or 0 otherwise. The following code demonstrates both a true and a false result:

  
    proc optmodel; 
       put (or{i in 1..5} i = 2); /* returns 1 */ 
       put (or{i in 1..5} i = 7); /* returns 0 */
 

Previous Page | Next Page | Top of Page