|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Format of __DATE__ Macro Has ChangedInformation in this article applies to:
QUESTIONI have just upgraded to version 5.50 of the C51 compiler and I notice that the format of the __DATE__ macro has changed. It used to be something like:
and now it is:
However, my code was dependent on the old format. Is there any way to change it back? ANSWERThe format was changed to meet the ANSI C Standard (see section 6.8.8). There is no option to change the format back, however, some simple C code will allow you to extract the month, day and year from the new format. The function getdate(), shown below, uses the global array months to place the month, day and year into the global unsigned chars. This can be used as a basis for your own code.
MORE INFORMATION
SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.