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.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to