Changeset 61dafb8


Ignore:
Timestamp:
Nov 7, 2018, 5:13:08 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
3180aa1
Parents:
909aebf
Message:

finish test and documentation for loop-control

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    r909aebf r61dafb8  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Fri Nov  2 07:27:24 2018
    14 %% Update Count     : 3397
     13%% Last Modified On : Wed Nov  7 17:00:49 2018
     14%% Update Count     : 3399
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    582582for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; }
    583583for ( ®ui; 10u -~= 2u ~ 2u® ) { sout | ui; }
    584 int start = 3, comp = 10, inc = 2;
     584enum { N = 10 };
     585for ( ®N® ) { sout | "N"; }
     586for ( ®i; N® ) { sout | i; }
     587for ( ®i; N -~ 0® ) { sout | i; }
     588const int start = 3, comp = 10, inc = 2;
    585589for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; }
    586590\end{cfa}
     
    606610
    607611sout | endl;
     612sout | endl;
     613sout | endl | endl;
     614
     615sout | endl;
    608616\end{cfa}
    609617&
     
    6266342 4 6 8 10
    62763510 8 6 4 2
     636
     637N N N N N N N N N N
     6380 1 2 3 4 5 6 7 8 9
     63910 9 8 7 6 5 4 3 2 1
    628640
    6296413 6 9
  • tests/.expect/loopctrl.txt

    r909aebf r61dafb8  
    2020
    2121
     22N N N N N N N N N N
     230 1 2 3 4 5 6 7 8 9
     2410 9 8 7 6 5 4 3 2 1
     25
     26
    22273 6 9
     28
    2329
    2430(0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)
  • tests/loopctrl.cfa

    r909aebf r61dafb8  
    1010// Created On       : Wed Aug  8 18:32:59 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:58:25 2018
    13 // Update Count     : 52
     12// Last Modified On : Wed Nov  7 16:54:11 2018
     13// Update Count     : 62
    1414//
    1515
     
    4141        for ( 1 ) { sout | "A"; }                                       sout | endl;
    4242        for ( 10 ) { sout | "A"; }                                      sout | endl;
    43 
    4443        for ( 1 ~= 10 ~ 2 ) { sout | "B"; }                     sout | endl;
    4544        for ( 10 -~= 1 ~ 2 ) { sout | "C"; }            sout | endl;
     
    5251        for ( i; 0.5 ~ 5.5 ) { sout | i; }                      sout | endl;
    5352        for ( i; 5.5 -~ 0.5 ) { sout | i; }                     sout | endl;
    54 
    5553        for ( ui; 2u ~= 10u ~ 2u ) { sout | ui; }       sout | endl;
    5654        for ( ui; 10u -~= 2u ~ 2u ) { sout | ui; }      sout | endl | endl | endl;
    5755
     56        enum { N = 10 };
     57        for ( N ) { sout | "N"; }                                       sout | endl;
     58        for ( i; N ) { sout | i; }                                      sout | endl;
     59        for ( i; N -~ 0 ) { sout | i; }                         sout | endl | endl | endl;
     60
    5861        const int start = 3, comp = 10, inc = 2;
    59         for ( i; start ~ comp ~ inc + 1 ) { sout | i; } sout | endl;
     62        for ( i; start ~ comp ~ inc + 1 ) { sout | i; } sout | endl | endl;
    6063
    6164        sout | endl;
Note: See TracChangeset for help on using the changeset viewer.