CompuServe Messages

#Lost at C (Again!)

    17-Mar-87 19:12:57
Fm: Richard Rae/SYSOP 76703,4253
To: Don Curtis/SYSOP 76703,4321
Don, Sonofagun, that seems to have done the trick; at least, seconds are correct at this point. I'll not know until I get farther in testing, but I wanted to get back to you ASAP. A couple of observations/questions: I am encouraged to see that I apparently did everything "right", or at least acceptably, and my only barrier was not understanding the synopsis of the function. I was positive my code was munged, pointers where I should be using addresses, etc. I don't see the rationale behind doing it this way. If I were writing localtime(), I would have used localtime(inptime,strptr), where strptr would point to _your_ pre-existing tm structure. Care to comment on what I'm missing? Is the whole point to minimize the number of parms passed, or is it just a different strokes situation? I tried your first format, pointer->element. Since localtime() is returning the pointer to its struct, I see no reason not to use pointer in this manner. Would you mind explaining why you think the second method might be more proper for the temp structure? Is it because you are expecting the struct to go away, or the address to change, and that this would not be reflected in pointer? If I'm just going to scarf the numbers I need from the translation, is there any need to even bother with my struct? Seems I could just use the temp struct, as long as I don't call localtime() again. Thanks for bearing with the questions. I am still very much a novice C hack, and like to get these things straight in my mind for future use. Appreciate the rescue! Rick