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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Date operatorsThere are no specific operators for dealing with dates, but, since numeric operatorsautomatically convert their arguments to numbers, these operators can be used to computethe time elapsed between two dates, to compare dates, or to add a given amount of time to adate. For example:date1 - date2 -> the number of milliseconds elapsed between date1 and date2.date1 < date2 -> true if date1 is before date2, false otherwise.new Date(date+10000) ->a date representing 10000 milliseconds after date.The following program displays the number of milliseconds taken to execute the statement :before = new Date();;after = new Date();writeln("Time for doing something: ", after-before, " milliseconds.");258I 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 L

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

Saved successfully!

Ooh no, something went wrong!