D - invariant
- Sean L. Palmer (6/6) Jun 15 2002 Can invariant be used without the () ? It doesn't seem necessary.
- Walter (4/10) Jun 16 2002 Yes. I never could decide if () should be required, so at the moment the...
- Sandor Hojtsy (6/12) Jun 18 2002 Especially compared to unittest without ( )
Can invariant be used without the () ? It doesn't seem necessary. invariant() { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); }
Jun 15 2002
Yes. I never could decide if () should be required, so at the moment they are optional. Note that there are no parameters to invariant's in any case. "Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:aegc1o$n0j$1 digitaldaemon.com...Can invariant be used without the () ? It doesn't seem necessary. invariant() { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); }
Jun 16 2002
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:aegc1o$n0j$1 digitaldaemon.com...Can invariant be used without the () ? It doesn't seem necessary. invariant() { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); }Especially compared to unittest without ( ) Since they have/mimic function like behaviour, I would be happy to see ( ) for both. Sandor
Jun 18 2002