Changeset b63e376 for src/examples/sum.c


Ignore:
Timestamp:
Mar 8, 2016, 10:24:43 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
ae357ec
Parents:
4040425
Message:

update refrat with new keywords, update examples, update separators for quoted strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/sum.c

    r4040425 rb63e376  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 18:12:01 2016
    13 // Update Count     : 194
     12// Last Modified On : Fri Mar  4 15:06:47 2016
     13// Update Count     : 196
    1414//
    1515
    1616#include <fstream>
    1717
    18 trait sumable( type T ) {
     18trait sumable( otype T ) {
    1919        const T 0;
    2020        T ?+?( T, T );
     
    2424}; // sumable
    2525
    26 forall( type T | sumable( T ) )
     26forall( otype T | sumable( T ) )
    2727T sum( unsigned int n, T a[] ) {
    2828        T total = 0;                                                                            // instantiate T, select 0
Note: See TracChangeset for help on using the changeset viewer.