At 20:18 +0200 2/8/06, Frank Heckenbach wrote:
Peter N Lewis wrote:
I have a lot of assertions. If one of them fails, GPC only reports something like "assertion failed (error #306 at 40dd45)". How can I find out the exact assertion that failed?
Rather than use the built in assertions, we use our own assertions, that way it allows us to compile them out of the later beta/final builds (a requirement for over-asserting as recommended by Writing Solid Code which should be essential reading for any programmer).
BTW, you can also do this with GPC's built-in assertions, using the option "--no-assertions".
Has this changed then? The docs I have say:
However, if the switch '--no-assertions' is given (see Section 5.1 [GPC Command Line Options], page 33), 'Assert' is deactivated. It still evaluates the condition if it has side effects, but never raises a runtime error.
In which case the evaluation would still be called, which means expensive evaluations cannot be left in...
It is possible it has changed since the docs I have, they are getting a bit old. Peter.