Wiki

Changes between Version 5 and Version 6 of Contracts

Show
Ignore:
Timestamp:
11/22/10 18:53:03 (14 years ago)
Author:
todd.a
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Contracts

    v5 v6  
    5555    e.g.  
    5656{{{  
     57#!cobra 
    5758     result.count implies result[0].length # non 0-length list item 
    5859     old.value implies old.value < .value  # value non zero and increased 
     
    6869e.g. 
    6970    {{{ 
     71#!cobra 
    7072    def sqroot(i as int) as float 
    7173        require  
     
    9294e.g. 
    9395   {{{ 
     96#!cobra 
    9497    def sqroot(i as int) as float 
    9598        ensure  
     
    126129e.g 
    127130{{{ 
     131#!cobra 
    128132    ... 
    129133    .new = .old + incr 
     
    156160== Grammar == 
    157161{{{ 
     162#!cobra 
    158163require  
    159164    BODY 
     
    170175on one line and skip 'body'. 
    171176{{{ 
     177#!cobra 
    172178require EXPR 
    173179ensure  EXPR