Ignore:
Timestamp:
Jul 29, 2024, 1:32:51 PM (4 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
f3d2a4f
Parents:
38e20a80 (diff), 1661ad7 (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:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/programs/hello-accordion.cfa

    r38e20a80 rce02877  
    99
    1010forall( T, @[NprovTerty]@, @[Nmunicipalities]@ )
    11 struct CanadaPop {
     11struct CanPop {
    1212        array( T, @NprovTerty@ ) provTerty; $\C{// nested VLA}$
    1313        array( T, @Nmunicipalities@ ) municipalities; $\C{// nested VLA}$
     
    1919
    2020forall( T, [NprovTerty], [Nmunicipalities] )
    21         void ?{}( T &, CanadaPop( T, NprovTerty, Nmunicipalities ) & this ) {}
     21        void ?{}( T &, CanPop( T, NprovTerty, Nmunicipalities ) & this ) {}
    2222
    2323forall( T &, [NprovTerty], [Nmunicipalities] )
    24         void ^?{}( CanadaPop( T, NprovTerty, Nmunicipalities ) & this ) {}
     24        void ^?{}( CanPop( T, NprovTerty, Nmunicipalities ) & this ) {}
    2525
    2626
     
    3939
    4040forall( T, [NprovTerty], [Nmunicipalities] )
    41 void check( CanadaPop( T, NprovTerty, Nmunicipalities ) & pop ) with( pop ) {
     41void check( CanPop( T, NprovTerty, Nmunicipalities ) & pop ) with( pop ) {
    4242        total_pt = total_mun = 0;
    4343        for ( i; NprovTerty ) total_pt += provTerty[i];
     
    6060int main( int argc, char * argv[] ) {
    6161        const int npt = ato( argv[1] ), nmun = ato( argv[2] );
    62         @CanadaPop( int, npt, nmun ) pop;@
     62        @CanPop( int, npt, nmun ) pop;@
    6363        // read in population numbers
    6464        @check( pop );@
     
    7171Total province/territory: 36,991,981
    7272Total municipalities: 36,991,981
     73$\$$ ./a.out  13  3654
     74Total province/territory: 36,991,981
     75Total municipalities: 36,991,981
    7376*/
    7477
Note: See TracChangeset for help on using the changeset viewer.