Changeset 181ef73 for libcfa/src


Ignore:
Timestamp:
Aug 31, 2021, 1:49:09 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
a01404e
Parents:
e658f5d
git-author:
Jacob Prud'homme <jafprudhomme@…> (06/22/21 00:17:47)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
Message:

Began using CFA loop constructs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    re658f5d r181ef73  
    44
    55static bool comments( ifstream & in, string & name ) {
    6         for ( ;; ) {
     6        while () {
    77                in | name;
    88          if ( fail( in ) ) return true;
     
    4242                open( in, configFile );                                                 // open the configuration file for input
    4343
    44                 for ( cnt = 0 ; cnt < Parmnum; ++cnt ) {                // parameter names can appear in any order
     44                for ( cnt; Parmnum ) {                                                  // parameter names can appear in any order
    4545                  if ( comments( in, name ) ) break;                    // eof ?
    46                         for ( posn = 0; posn < Parmnum && name != parms[posn].name; ++posn ); // linear search
     46                        for ( posn; posn < Parmnum && name != parms[posn].name; ++posn ); // linear search
    4747                  if ( posn == Parmnum ) break;                                 // configuration not found ?
    4848                  if ( parms[posn].used ) break;                                // duplicate configuration ?
Note: See TracChangeset for help on using the changeset viewer.