ODBiC Discussion Board


RE: Reading files with more than 1000 lines, Jon Grosse, 12-18-2007

Have to use nested loops

by Roger Harris, December 18, 2007 10:15

Since ODBscript was designed as a web page generator instead of a general-purpose language, I put that limit on loops to prevent "run-away" scripts. Unfortunately, the only way around it is to use nested loops -- i.e. one WHILE loop inside another, which gives you 1,000,000 iterations. If you're reading a file it would be something like this:

<%
WHILE NOT $eof(theFile);
    WHILE NOT $eof(theFile);
       SET line = $read(theFile);
    ENDWHILE;
ENDWHILE;
%>


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.