#Lost at C (Again!)
Okay, all you C worthies… I need your help (again!), this time with
interpreting something in the Manx manual (nope, I'm still using 3.20A just
like everyone else).
My problem is with the synopsis for localtime(), which is:
struct tm *localtime(clock)
long *clock;
This says to me that localtime is a function returning type pointer-to-struct
tm, and is called with one parameter which is of type pointer-to-long.
My difficulty is in understanding where the struct comes in. In other words,
I pass localtime() the address of a long which contains time in an internal
format. localtime() returns to me a pointer to the structure containing the
reformatted time. Eh? But I didn't tell the function what structure I
wanted the data IN! Did it just pick one at random?
I've tried all the things which look reasonable (and, in desperation,
unreasonable), and Ami for the most part responded by crashing
enthusiastically and often… just what I'd expect.
So, I'd appreciate help with how to use this function. I couldn't find any
code in the DL which uses anything similar. Best bet would be to give me a
snippet of code showing how to do it, but anything would be appreciated.
The next message will be the last code fragment I tried, which of course
returns garbage, because the system and I aren't talking about the same
structs.
TNX 1E6!