Previous Page | Next Page

The OPTMODEL Procedure

WITHIN Expression

set-expression WITHIN set-expression ;
set-expression NOT WITHIN set-expression ;

The WITHIN expression returns 1 if the left operand set is a subset of the right operand set and returns 0 otherwise. (That is, the operator returns true if every member of the left operand set is a member of the right operand set.) The NOT WITHIN form logically negates the result value. The following code demonstrates the WITHIN and NOT WITHIN operators:

proc optmodel;
   put ({1,3} within {2,3});     /* outputs 0 */
   put ({1,3} not within {2,3}); /* outputs 1 */
   put ({1,3} within {1,2,3});   /* outputs 1 */


Previous Page | Next Page | Top of Page