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.

Numeric operatorsNote: For C/C++ programmers: The numeric operators are the same as in C and C++.Numeric operatorsSyntax Effectx + y The usual arithmetic operations.Examples:x - y3 + 4.2 7.2 100 - 120 -20 4 * 7.1 28.4 6 / 5 1.2x * yx / y- xNegation.Examples:- 142 -142x % yReturns the floating-point remainder of dividing x by y.Examples:12 % 5 2 12.5 % 5 2.5x == yx != yx < yx yThe operator == returns true if x and y are equal, and false otherwise. The operator != is theconverse of ==.Examples:12 == 12 true 12 == 12.1 false 12 != 12.1 trueThe operator < returns true if x is less than y, and false otherwise.The operator

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

Saved successfully!

Ooh no, something went wrong!