[fpc-pascal] question about FpTimes in BaseUnix package

Bruce Bauman bruce.bauman at andesaservices.com
Tue Nov 17 19:34:19 CET 2009


I am using the FpTimes function from the BaseUnix package. The
documentation says it returns -1 on an error, otherwise the number of
clock ticks since boot time. However, the return type of this function
is TClock, which is unsigned.

This, if I say:

X := BaseUnix.FpTimes(T);

if (X <> -1) then ...

I get a compiler-time warning (range check error while evaluating
constants).

Should the return type not be unsigned? Is checking the result against
-1 OK?

-- Bruce 
CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is addressed.  If
you are not the intended recipient, be advised that you have received 
this email in error and that any use, dissemination, forwarding, printing 
or copying of this e-mail is strictly prohibited. If you received this e-mail
in error, please delete it from your computer and contact the sender.




More information about the fpc-pascal mailing list