Re: Debug levels

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 29 Aug 2001 11:12:52 +0200

"Chemolli Francesco (USI)" wrote:

> > #define debug(SECTION, LEVEL) \
> > ((LEVEL) > MAX_DEBUG_LEVEL || (_db_level = (LEVEL)) >
> > debugLevels[SECTION])
> > ? (void) 0 : _db_print
>
> Uhm, yes. I missed the point that it's the "else" branch being taken.
> 'f course, it could also be written as
>
> #define debug(SECTION, LEVEL) \
> ((LEVEL) < MAX_DEBUG_LEVEL && (_db_level = (LEVEL)) <
> debugLevels[SECTION])? (void)0: _db_print
>
> simple bool math.

Uhm.. not quite. I leave it to you to find the quite big error in the
above statement.

> Only where the level was not constant. I'm not aware of such instances,
> but that doesn't mean they might not appear in the future.

We have had such instances in the past for sure.

--
Henrik
Received on Wed Aug 29 2001 - 03:17:10 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:16 MST