Changeset d69f4bb for tests/forctrl.c


Ignore:
Timestamp:
Aug 29, 2018, 6:09:48 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:
933933c
Parents:
bcb14b5
Message:

add downto to for control

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/forctrl.c

    rbcb14b5 rd69f4bb  
    1010// Created On       : Wed Aug  8 18:32:59 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 16 09:25:47 2018
    13 // Update Count     : 6
     12// Last Modified On : Wed Aug 29 18:04:15 2018
     13// Update Count     : 26
    1414//
    1515
     
    3333        do { sout | "empty"; break; } while (); sout | endl;
    3434        for () { sout | "empty"; break; }               sout | endl;
    35         for ( 10 ) { sout | "X"; }                              sout | endl;
    36         for ( 0.5 ~ 5.5 ) { sout | "Y"; }               sout | endl;
    37         for ( 2 ~= 10 ~ 2 ) { sout | "Z"; }             sout | endl;
     35
     36        for ( 10 ) { sout | "A"; }                              sout | endl;
     37
     38        for ( 2 ~= 10 ~ 2 ) { sout | "B"; }             sout | endl;
     39        for ( 10 -~= 2 ~ -2 ) { sout | "C"; }   sout | endl;
     40        for ( 0.5 ~ 5.5 ) { sout | "D"; }               sout | endl;
     41        for ( 5.5 -~ 0.5 ) { sout | "E"; }              sout | endl;
     42
    3843        for ( i; 10 ) { sout | i; }                             sout | endl;
    3944        for ( j; 10 ) { sout | j; }                             sout | endl;
     45
     46        //for ( i; 1 ~= 10 ~ 2 ) { sout | i; }  sout | endl;
     47        for ( i; 2 ~= 10 ~ 2 ) { sout | i; }    sout | endl;
     48        for ( i; 10 -~= 2 ~ -2 ) { sout | i; }  sout | endl;
    4049        for ( i; 0.5 ~ 5.5 ) { sout | i; }              sout | endl;
    41         for ( i; 2 ~= 10 ~ 2 ) { sout | i; }    sout | endl;
     50        for ( i; 5.5 -~ 0.5 ) { sout | i; }             sout | endl;
     51
    4252        for ( ui; 2u ~= 10u ~ 2u ) { sout | ui; } sout | endl;
     53        for ( ui; 10u -~= 2u ~ -2u ) { sout | ui; } sout | endl;
     54
    4355        int start = 3, comp = 10, inc = 2;
    4456        for ( i; start ~ comp ~ inc + 1 ) { sout | i; } sout | endl;
Note: See TracChangeset for help on using the changeset viewer.