Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!ut-sally!seismo!cmcl2!philabs!aecom!naftoli From: naftoli@aecom.UUCP (Robert N. Berlinger) Newsgroups: net.micro.mac Subject: Re: Aztec 1.06H.1 disk & nested func calls Message-ID: <347@aecom.UUCP> Date: Tue, 1-Jul-86 16:59:04 EDT Article-I.D.: aecom.347 Posted: Tue Jul 1 16:59:04 1986 Date-Received: Thu, 3-Jul-86 05:55:59 EDT References: <2256@cbosgd.UUCP> Distribution: na Organization: Albert Einstein College of Medicine Lines: 25 > I was doing a call like: > > strcpy(s, ctime(time((time_t)NULL))); > > which apparently doesn't work right most of the time (I got address errors > when it died). Breaking the function calls apart, as in: > > time(&foo); > bar = ctime(&foo); > strcpy(s, bar); > > (where foo, bar, s, etc. all have the appropriate definitions) seems to have > fixed the problem. These are not equivalent! "time((time_t)NULL)" does not return a pointer, it returns a time_t. Ctime, however, does expect a pointer, which you properly passed in your second version. There is no way to nest them, in this case. -- Robert Berlinger Systems Analyst Albert Einstein College of Medicine UUCP: ...{philabs,cucard,pegasus,ihnp4,rocky2}!aecom!naftoli Compuserve: 73047,741