Changes between Version 1 and Version 3 of Ticket #8
- Timestamp:
- Sep 27, 2018, 2:50:01 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8 – Description
v1 v3 1 1 {{{ 2 forall( otype T | { void ?{}( T *, zero_t ); T ?+?( T, T ); } )2 forall( otype T | { void ?{}( T &, zero_t ); T ?+?( T, T ); } ) 3 3 T sum( int n, T a[] ) { 4 T total = (T){0}; // instantiate T, select 04 T total = 0; // instantiate T, select 0 5 5 for ( int i = 0; i < n; i += 1 ) 6 6 total = total + a[i]; // select +