time(0L) - history of a misconception

Doug Gwyn gwyn at smoke.brl.mil
Wed May 22 11:04:24 AEST 1991


In article <1141 at mwtech.UUCP> martin at mwtech.UUCP (Martin Weitzel) writes:
>>	long seed = time(0L);
>I'm curious if anybody has ideas from where this misconception originated.

The roots of many such errors are probably unknown even to the original
culprits.

In this particular case, my best guess is that the common "time(0)" usage
was "repaired" during port to a system where it mattered, and the person
doing the repair was thinking merely of the required representation for
the argument to work right, not more abstractly in terms of its type.
You can see this also in the common
	#define	NULL	0L



More information about the Comp.lang.c mailing list