Changeset adb6b30f for tests/coroutine


Ignore:
Timestamp:
Aug 16, 2018, 9:35:06 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
0c1d240
Parents:
3de9135
Message:

more forctrl changes

Location:
tests/coroutine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tests/coroutine/fibonacci.c

    r3de9135 radb6b30f  
    1111// Created On       : Thu Jun  8 07:29:37 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri Apr 27 08:55:31 2018
    14 // Update Count     : 19
     13// Last Modified On : Thu Aug 16 08:18:16 2018
     14// Update Count     : 20
    1515//
    1616
     
    2626        fn = 1;  fn2 = fn1;  fn1 = fn;                                          // 2nd case
    2727        suspend();                                                                                      // restart last resume
    28         for ( ;; ) {
     28        for () {
    2929                fn = fn1 + fn2;  fn2 = fn1;  fn1 = fn;                  // general case
    3030                suspend();                                                                              // restart last resume
  • tests/coroutine/fmtLines.c

    r3de9135 radb6b30f  
    1010// Created On       : Sun Sep 17 21:56:15 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 15 12:25:33 2018
    13 // Update Count     : 42
     12// Last Modified On : Thu Aug 16 08:20:54 2018
     13// Update Count     : 45
    1414//
    1515
     
    2323
    2424void main( Format & fmt ) with( fmt ) {
    25         for ( ;; ) {                                                                            // for as many characters
    26                 for ( g = 0; g < 5; g += 1 ) {                                  // groups of 5 blocks
    27                         for ( b = 0; b < 4; b += 1 ) {                          // blocks of 4 characters
    28                                 for ( ;; ) {                                                    // for newline characters
     25        for () {                                                                                        // for as many characters
     26                for ( g; 5 ) {                                                                  // groups of 5 blocks
     27                        for ( b; 4 ) {                                                          // blocks of 4 characters
     28                                for () {                                                                // for newline characters
    2929                                        suspend();
    3030                                        if ( ch != '\n' ) break;                        // ignore newline
     
    5353        Format fmt;
    5454
    55         eof: for ( ;; ) {                                                                       // read until end of file
     55  eof: for () {                                                                                 // read until end of file
    5656                sin | fmt.ch;                                                                   // read one character
    5757          if ( eof( sin ) ) break eof;                                          // eof ?
  • tests/coroutine/runningTotal.c

    r3de9135 radb6b30f  
    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
     12// Last Modified On : Thu Aug 16 08:22:29 2018
     13// Update Count     : 3
    1414//
    1515
     
    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.