Ignore:
Timestamp:
Aug 21, 2018, 2:24:29 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
2a6292d
Parents:
2b79a70 (diff), efa8b6a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 moved

Legend:

Unmodified
Added
Removed
  • tests/coroutine/runningTotal.c

    r2b79a70 rcdbab55  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // runningTotal.c -- 
    8 // 
     6//
     7// runningTotal.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Dec  6 08:05:27 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  6 08:09:24 2017
    13 // Update Count     : 2
    14 // 
     12// Last Modified On : Thu Aug 16 08:22:29 2018
     13// Update Count     : 3
     14//
    1515
    16 #include <fstream>
    17 #include <coroutine>
     16#include <fstream.hfa>
     17#include <coroutine.hfa>
    1818
    1919coroutine RunTotal {                                                                    // input numbers and return running total
     
    2929
    3030void main( RunTotal & rntl ) with( rntl ) {
    31         for ( ;; ) {
     31        for () {
    3232                update( rntl, input );
    3333        } // for
     
    4141int main() {
    4242        RunTotal rntl;
    43         for ( int i = 0; i < 10; i += 1 ) {
     43        for ( i; 10 ) {
    4444                sout | i | add( rntl, i ) | endl;
    4545        } // for
Note: See TracChangeset for help on using the changeset viewer.