Skip to main content
FLast.19.71
Associate
Oct 17, 2016 9:20 AM UTC
Question

Compile DATE and TIME constants, Cosmic

Posted on October 17, 2016 at 11:20

Hi,

I used to work with Microchip PICs and the compiler c18 provided string constants holding the compile time & date, updated in compile (or link ?) time; examples:

__DATE__ == ''Jul 08 2016''

__TIME__ == ''10:56:03''

Does Cosmic provide anything similar ?

    This topic has been closed for replies.

    2 replies

    luca239955_stm1_st
    Associate
    Oct 17, 2016 10:54 AM UTC
    Posted on October 17, 2016 at 12:54

    Hi,

    yes, it works exactly the same.

    Philipp Krause
    Senior II
    Oct 25, 2016 5:50 PM UTC
    Posted on October 25, 2016 at 19:50

    These are standard c features, and should work on any C compiler. They are supposed to hold ''translation'' date and time, if available. Since they are macros evaluating to string constants they will hold the date and time of preprocessing.

    Philipp