Thread overview
report-statement (like C #warning)
Sep 04, 2005
Lukas Pinkowski
Sep 04, 2005
Thomas Kühne
Sep 04, 2005
Lukas Pinkowski
September 04, 2005
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.
September 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
September 04, 2005
Thomas Kühne wrote:

> 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

Thanks! I studied almost the whole documentation, and I missed this one! Walter really thought of everything :-)