digitalmars.D - report-statement (like C #warning)
- Lukas Pinkowski (16/16) Sep 04 2005 Hi all,
- =?ISO-8859-1?Q?Thomas_K=FChne?= (3/10) Sep 04 2005 pragma(msg, "TODO: read the documentation ;)");
- Lukas Pinkowski (3/15) Sep 04 2005 Thanks! I studied almost the whole documentation, and I missed this one!
Hi all, while working on my project, I had the idea of a static report statement, that writes some text to the command line, when compiling a module. Something along the lines of: report("TODO: clean this up!"); Translating to: foo.d(120): TODO: clean this up! I rather forget/oversee TODOs in comments (despite them being highlighted), and I am quite too lazy to produce and manage an extra TODO.txt. It's better when you are constantly reminded of them, rather then to search on your own for them. This could be also used along with assert: assert(i!=0) report("i is not 0!"); This could look like foo.d(120): AssertError: i is not 0! I saw this was used in VHDL, which was quite neat.
Sep 04 2005
Lukas Pinkowski schrieb:Hi all, while working on my project, I had the idea of a static report statement, that writes some text to the command line, when compiling a module. Something along the lines of: report("TODO: clean this up!");pragma(msg, "TODO: read the documentation ;)"); Thomas
Sep 04 2005
Thomas Kühne wrote:Lukas Pinkowski schrieb:Thanks! I studied almost the whole documentation, and I missed this one! Walter really thought of everything :-)Hi all, while working on my project, I had the idea of a static report statement, that writes some text to the command line, when compiling a module. Something along the lines of: report("TODO: clean this up!");pragma(msg, "TODO: read the documentation ;)"); Thomas
Sep 04 2005