You can usually use trunc() or round() . If this does not work for you, I suggest you try to find a forum that specializes in PaxCompiler or PascalScript. You may not be the first to do this, but someone more familiar with these compilers may know how to solve the problem with these compilers.
I tried it in Free Pascal and it works there. IIRC works at Borland Delphi and Turbo Pascal (it has been several years since I programmed in pascal so I could be wrong).
If none of the above actions work, you can try to put it in a global variable. Even if global variables are bad, sometimes this can be the worst.
some source share