Changes between Version 5 and Version 6 of Contracts
- Timestamp:
- 11/22/10 18:53:03 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Contracts
v5 v6 55 55 e.g. 56 56 {{{ 57 #!cobra 57 58 result.count implies result[0].length # non 0-length list item 58 59 old.value implies old.value < .value # value non zero and increased … … 68 69 e.g. 69 70 {{{ 71 #!cobra 70 72 def sqroot(i as int) as float 71 73 require … … 92 94 e.g. 93 95 {{{ 96 #!cobra 94 97 def sqroot(i as int) as float 95 98 ensure … … 126 129 e.g 127 130 {{{ 131 #!cobra 128 132 ... 129 133 .new = .old + incr … … 156 160 == Grammar == 157 161 {{{ 162 #!cobra 158 163 require 159 164 BODY … … 170 175 on one line and skip 'body'. 171 176 {{{ 177 #!cobra 172 178 require EXPR 173 179 ensure EXPR