 |
|
 |
this article deserve it.. though i am reading it quite late
|
|
|
|
 |
|
 |
This makes my TODO messages so much easier to find. Thank you!
|
|
|
|
 |
|
 |
Any idea how to do this in c#
Sk8tZ
|
|
|
|
 |
|
 |
Well, you dont do that in C#.
To quote the C# reference: Unlike C and C++ directives, you cannot use these directives to create macros.
They do not expand therefore you cant create the desired effect. Anyway you can use the #warning pragma to output information with linenumbers.
Rufus[^] - Mailing List Management
|
|
|
|
 |
|
 |
Hi folks,
if you change "Warning Msg:" to "warning:" at least VC++.NET displays them then as warnings in its compilesummary.
|
|
|
|
 |
|
 |
VC6 too.
Off to Brazil in a few days
|
|
|
|
 |
|
 |
-----------------------------------------------------------------
#define __STR2__(x) #x
#define __STR1__(x) __STR2__(x)
#define __LOC__ __FILE__ "("__STR1__(__LINE__)") : Warning Msg: "
#define __LOC2__ __FILE__ "("__STR1__(__LINE__)") : "
#define COMPILE_WARN(s) message(__LOC__ s)
#define COMPILE_ERROR(d,s) message(__LOC2__ "error " d ": " s)
-----------------------------------------------------------------
And know use only
#pragma COMPILE_WARN("Check it here")
in your code..
or
#pragma COMPILE_ERROR("C9999","Don't forget to code here!")
Diogo Quintela
|
|
|
|
 |
|
 |
You can do just that with #error Don't forget to code here! too.
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
 |
|
 |
No!
#error produces a fatal error and stops compiling, so you never see all your errors at once!
|
|
|
|
 |
|
 |
I hate it when I accidently leave debugging stuff in the code. This will help.
Cathy
Life's uncertain, have dessert first!
|
|
|
|
 |
|
 |
Glad its of use for you.
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
 |
|
 |
This article is nothing more than a useless piece of paragraph.The author must add something new to make it interesting.
Do something new in life.
|
|
|
|
 |
|
 |
I strongly disagree!
My own code is littered with ugly
#pragma message( "\\hardcodedfilename.cpp (234) : don't forget to do this and that" )
This article will help me and countless other to unobsuscate their code: make it easy to
read by other human beings.
I agree with the author that this trick is useful right away, as is.
He diserves my 5.
|
|
|
|
 |
|
 |
No, it's useless since it doesn't explain what's going on. It should minimally explain why each level of indirection is needed.
|
|
|
|
 |
|
 |
I forgive your poor appreciation of the article, but I find its great: at the end of reading the article, my code is better than it was before I read it.
The point is that the article is effective.
|
|
|
|
 |
|
 |
Article pirated from some other web site and published.Can we get something new..
Learning is a never ending process of Life.
|
|
|
|
 |
|
 |
> "Can we get something new..." does it really matter who invented a piece of code or technique? should library's destroy all their books after, say, 6 months? do you have an embarassingly small p*nis
|
|
|
|
 |
|
 |
You cannot have been inspired by a note from the CUJ magazine, because your code is even more likely to be a copy/paste from MSDN library. I have seen it there a couple of months ago.
|
|
|
|
 |
|
 |
Normally, when a part or an entire article is quoted, it is desirable and ethical to paste a copyright notice or a source where the quote has come from to prevent any potential accusations in plagiarism.
-- modified at 20:08 Wednesday 8th March, 2006
|
|
|
|
 |
|
 |
Havn't seen this type of lamenting before
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
 |