Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihuxl!dixon From: dixon@ihuxl.UUCP (D. A. Dixon) Newsgroups: net.unix-wizards Subject: Re: question about ctime(3) and time(2) Message-ID: <1047@ihuxl.UUCP> Date: Mon, 16-Apr-84 10:25:55 EST Article-I.D.: ihuxl.1047 Posted: Mon Apr 16 10:25:55 1984 Date-Received: Tue, 17-Apr-84 07:17:32 EST Organization: Bell Laboratories, Naperville, IL Lines: 24 Two points regarding the program main() { long i; char *t; t = ctime(time(&i)); } 1.) time() returns a long where as ctime() requires the address of a long; 2.) on a PDP 11 you must declare time() to be a function returning a long, otherwise it will default to a function returning an int (which is a 16 bit quantity on the PDP 11). Also, as a matter of form you should declare ctime() to be a function returning a pointer. D A Dixon ihnp4!ihuxl!dixon