Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is literal meaning of asctime() ?

Status
Not open for further replies.

satellite03

IS-IT--Management
Dec 26, 2003
248
IN
what is literal meaning of asctime() for calculating time.

is it asctime == ascii time ?

 
Yeah, that's pretty much what I would think it means.

Though I hope that in an EBCDIC environment, it would return a pointer to an EBCDIC string rather than an ASCII string.

Just one of those things which may have a misleading name, an accident of history.

--
 
For calculating asctime() do nothing. It returns a pointer to the character (so called ASCiiZ) string result in static storage, e.g.:
Code:
"Wed Apr 14 08:35:52 2004\n"
Now you may print the string - that's all (don't forget about newline char in the string)...
It is a C/C++ Standard library member (comes from Unix world)...
 
I'd say its a rather good name, you can guess what it does and there's a high probability your guess is right :).

Not like for example getch; a name that implies it returns a char when it infact returns an int. Brrrr....



/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top