R
ramu
Hi,
Could you please let me know how to use _TIME_ macro with a
sample code?
Regards
Could you please let me know how to use _TIME_ macro with a
sample code?
Regards
#include <stdio.h>ramu said:Hi,
Could you please let me know how to use _TIME_ macro with a
sample code?
Hi,
Could you please let me know how to use _TIME_ macro with a
sample code?
Regards
Ian said:#include <stdio.h>
int main(void) {
puts(__TIME__);
}
CBFalconer said:Reading the (easily available) standard is much faster. I.e:
6.10.8 Predefined macro names
[#1] The following macro names shall be defined by the
implementation:
... snip ...
__TIME__ The time of translation of the source file: a
character string literal of the form "hh:mm:ss" as
in the time generated by the asctime function. If
the time of translation is not available, an
implementation-defined valid time shall be
supplied.
santosh said:CBFalconer said:Reading the (easily available) standard is much faster. I.e:
The Standard isn't easily available at all from the perspective of a
beginner. Even the existence of a Standard, it's Committee's website,
and the presence of public drafts is unknown to the vast majority of
newbies. Besides, the Standard document (or the draft) is _not_ a good
place for a newbie to seek help. He would be much better off with
almost any decent C book or tutorial.
6.10.8 Predefined macro names
[#1] The following macro names shall be defined by the
implementation:
... snip ...
__TIME__ The time of translation of the source file: a
character string literal of the form "hh:mm:ss" as
in the time generated by the asctime function. If
the time of translation is not available, an
implementation-defined valid time shall be
supplied.
This would be most opaque to someone just starting out with C. Terms
like "implementation", "translation", "character string
literal", "asctime", "implementation-defined valid time" etc., are
likely to be confusing at best.
<snip>
santosh said:CBFalconer wrote:
.... snip ...
The Standard isn't easily available at all from the perspective
of a beginner. Even the existence of a Standard, it's Committee's
website, and the presence of public drafts is unknown to the vast
majority of newbies. Besides, the Standard document (or the draft)
is _not_ a good place for a newbie to seek help. He would be much
better off with almost any decent C book or tutorial.
CBFalconer said:That's why I attached a list of places to get such things, which
you snipped. Most newbies accessing Usenet have access to the WWW
system.
santosh said:That still leaves unsolved the difficulty for a newbie of
comprehending the Standard's language. The C Standard is only
accessible for someone already fairly experienced with C (at least
a year I would say), unless the person were extraordinarily bright.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.