cancel
Showing results for 
Search instead for 
Did you mean: 

Compile DATE and TIME constants, Cosmic

FLast.19.71
Associate II
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 ?

2 REPLIES 2
luca239955_stm1_st
Senior II
Posted on October 17, 2016 at 12:54

Hi,

yes, it works exactly the same.

Philipp Krause
Senior II
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