Automatic Keywords in online compiler?

27 May 2016

Hi, I am wondering if there is a help page for how to add automatic keywords that can be expanded when compiling. Specifically I would like to use DATE and TIME (what ever the correct keyword is...) and if there is some way to expand the commit revision in the code.

Thanks Bill

25 May 2016

BTW, am I doing something wrong to make it line out the words in my text?

26 May 2016

Hi Bill,

There are a number of standard macros; for date and time I commonly use this pattern:

    const PROG_INFO[] = "My Program - build " __DATE__ " " __TIME__;
    ...
    printf("%s\r\n", PROG_INFO);

And if you click the "Editing tips" at the bottom right of the text entry field, it will expand to show you why your strike through occurred.

27 May 2016

Thanks David for both the editing tips and the macro info.

Bill

27 May 2016

I realized I didn't try to respond to your 2nd part - the commit revision. This topic inspired some discussion, but tapered off I think w/o a resolution as you see here https://developer.mbed.org/forum/bugs-suggestions/topic/3161/