trunc(r + if r >= 0 then .5 else -.5)
The version of AMPL that ILOG now distributes does support user-defined
functions. I'm not sure what it takes to get them to update your copy to
that version. (If you switch to the AMPL company's license agreement then
you can pay one year's maintenance -- 15% of the relevant purchase price --
and get the latest version including user-defined functions.)
Bob Fourer
4...@ampl.com