The OPTMODEL Procedure |
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 */
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.