D - typo/mistake in class.html ?
- A casual observer (19/19) Sep 11 2003 In the documentation, class.html describes an invariant function with th...
- Walter (1/1) Sep 13 2003 You're right. I'll make the corrections. Thanks!
In the documentation, class.html describes an invariant function with the following example: class Date { int day; int hour; invariant() { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); } } I believe (based on experiments with the compiler) that the () need to be left off the invariant declaration: invariant { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); }
Sep 11 2003
You're right. I'll make the corrections. Thanks!
Sep 13 2003