Changeset 24856


Ignore:
Timestamp:
05/15/20 14:27:50 (5 years ago)
Author:
Eric.Larour
Message:

CHG: allow for '<' in the range, when the runme file gets really big.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/scripts/ol.m

    r22895 r24856  
     1function ol(varargin)
    12
    2 %Open runme.m file and read line by line
    3 fid=fopen('runme.m','r');
     3        options=pairoptions(varargin{:});
    44
    5 tline = fgets(fid);
    6 count=1;
    7 while ischar(tline)
     5        range=getfieldvalue(options,'<',Inf);
     6
     7        %Open runme.m file and read line by line
     8        fid=fopen('runme.m','r');
     9
    810        tline = fgets(fid);
    9         if strncmpi(tline,'if perform(org,',14),
    10                 lastchar = strfind(tline,')');
    11                 lastchar = lastchar(end)-1;
    12                 disp(sprintf('%2i: %s',count,tline(16:lastchar)));
    13                 count=count+1;
     11        count=1;
     12        while ischar(tline)
     13                tline = fgets(fid);
     14                if strncmpi(tline,'if perform(org,',14),
     15                        lastchar = strfind(tline,')');
     16                        lastchar = lastchar(end)-1;
     17                        disp(sprintf('%2i: %s',count,tline(16:lastchar)));
     18                        if count>range,
     19                                break;
     20                        end
     21                        count=count+1;
     22                end
    1423        end
    15 end
     24        fclose(fid);
Note: See TracChangeset for help on using the changeset viewer.