12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

int array[i in set1] = ((sum(j in set2) 1 >= 1) ? 1:0);that is, the two “i” on either side of the “equal” sign = are not linked. This is called scopehiding because the second “i” hides the first one in a nested scope.In contrast, this statementint array[ in set1] = ((sum( in set2) 1 >= 1) ? 1:0);codes implicit slicing, which is equivalent to:int array[i in set1] = ((sum(j in set2 : j==i) 1 >= 1) ? 1:0);In other words, there is no implicit slicing outside tuple patterns.See also Modeling tips in the <strong>Language</strong> User’s <strong>Manual</strong>.I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L139

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!