__FILE__ + __DATE__

Discussion in 'C Programming' started by Zero, Dec 3, 2007.

  1. Zero

    Zero Guest

    Hello all,

    is it possible to change the format of __FILE__ + __DATE__,
    for example instead of hh:mm:ss ss:mm:hh?

    Where can I get information on this topic?
     
    Zero, Dec 3, 2007
    #1
    1. Advertisements

  2. Zero

    santosh Guest

    No. You implementation may provide some way out, for which consult it's
    documentation or an appropriate group. This group is implementation
    agnostic.
     
    santosh, Dec 3, 2007
    #2
    1. Advertisements

  3. Not in (standard) C, but <OT> for make (and perhaps some other build
    systems) on some systems you can do something like:
    c89 -DMYDATE=`date +%blahbah` otherflagsandfiles

    Filenames are somewhat harder in general because essentially all
    nontrivial translation units will involve more than one source file.
    Also on non-Unix systems there is variation in the preferred and even
    allowed syntaxes of filenames/pathnames/etc. You may have to punt on
    these issues, or at least limit your supported platforms.

    But if what you want is some component and/or version identifier(s)
    that are different from the standard ones, just make your own.

    - formerly david.thompson1 || achar(64) || worldnet.att.net
     
    David Thompson, Dec 17, 2007
    #3
    1. Advertisements

Ask a Question

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 (here). After that, you can post your question and our members will help you out.