Changes in / [7444113:6f71276]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/generic_types.tex

    r7444113 r6f71276  
    214214Hence, programmers can easily form new local environments to maximize reuse of existing functions and types.
    215215
    216 Finally, variables may be overloaded:
     216Finally, \CFA allows variable overloading:
    217217\lstDeleteShortInline@
    218218\par\smallskip
     
    263263forall( otype T | summable( T ) )
    264264  T sum( T a[$\,$], size_t size ) {
    265         T total = { 0 };                                                $\C{// instantiate T from 0}$
     265        `T` total = { `0` };                                    $\C{// instantiate T from 0}$
    266266        for ( unsigned int i = 0; i < size; i += 1 )
    267                 total += a[i];                                          $\C{// select appropriate +}$
     267                total `+=` a[i];                                        $\C{// select appropriate +}$
    268268        return total;
    269269}
Note: See TracChangeset for help on using the changeset viewer.