Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!pyrltd!mwuk!tony From: tony@mwuk.UUCP (Tony Mountifield) Newsgroups: comp.os.os9 Subject: Re: os9 time help. Keywords: os9 time Message-ID: <465@mwuk.UUCP> Date: 19 Jun 91 09:17:22 GMT References: <285d1b3f-1b4comp.os.os9@vpnet.chi.il.us> Organization: Microware Systems (UK) Ltd., Winchester, UK. Lines: 36 In article <285d1b3f-1b4comp.os.os9@vpnet.chi.il.us> akcs.scw@vpnet.chi.il.us (scott whittle) writes: -> Help -> I'm running OS/9 Professional on a 68030 system. I'm trying to get the -> date and time from the system with this bit of programing. -> -> #include -> -> main() -> { -> int *time,*date,*tick; -> short *day; -> -> _sysdate(0,&time,&date,&day,&tick); -> -> printf("Time is Time:%d date:%d date:%d tick:%d",time,date,day,tick); -> -> } If you look at the example in the C Compiler Manual for _sysdate(), you will see that you should have declared the variables without the '*'s: int time,date,tick; short day; You were probably getting misled by the synopsis, which describes what TYPES of parameter _sysdate() is expecting. You were passing it pointers-to-(pointers which don't yet point anywhere). Hope this helps. -- Tony Mountifield. | Microware Systems (UK) Ltd. MAIL: tony@mwuk.uucp | Leylands Farm, Nobs Crook, INET: tony%mwuk.uucp@ukc.ac.uk | Colden Common, WINCHESTER, SO21 1TH. UUCP: ...!mcsun!ukc!mwuk!tony | Tel: 0703 601990 Fax: 0703 601991 **** OS-9, OS-9000 Real Time Systems **** MS-DOS - just say "No!" ****