ANSI 'C'.

Ray Butterworth rbutterworth at watmath.UUCP
Thu Nov 21 03:19:32 AEST 1985


>   The standard has no real business specifying the environment in this
> amount of detail, or perhaps it should be worded with something like
> "If you are going to supply XXXX functionality, do it like this...".

The standard obviously didn't put much thought into anything related to
times.  They define type "time_t" as an arithmetic type that represents
the time, and then define a difftime(time_t time1,time_t time2) that
computes the difference between these two arithmetic values.  Why the
function?  Does the standard have a new arithmetic type on which the
operation of subtraction is not allowed?
And then they define a function gmtime(const time_t *timer) that takes
a pointer to the arithmetic value, which it is not going to change anyway.
Why not just take the value itself instead of the pointer?



More information about the Comp.lang.c mailing list