To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 2323
    Re: Design by Contract (long post) —Tim McSweeney
   (...) For more fun with asserts: See if your compiler supports the FILE and LINE macros (or something equivilant). #ifdef NDEBUG #define assert(x) ((void)0) #else #define assert(x) if (x) else assertfail(FILE,LINE); #endif your assert_fail function (...) (20 years ago, 9-Jan-04, to lugnet.robotics.rcx, FTX)
   
        Re: Design by Contract (long post) —Iain McInnes
   Thanks, Tim. I haven't used the #x idiom myself - I like it. Your implementation with the boolean: (...) Will need an extra level of parenthesis surrounding the bool so that its declaration scope is made local. You can certainly go to town with this (...) (20 years ago, 10-Jan-04, to lugnet.robotics.rcx, FTX)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR