Translate page

DOWHILE

 


DOWHILE (search, ‘‘search text’‘)… ENDWHILE

 

Used to execute a set of statements while a specified condition is true. If the condition evaluates to false, the loop will never execute. The condition must be a ‘search’ command that evaluates to true or false.

 

Usage: dowhile (search, ‘‘search text’‘)

  Statement

  Statement

  …..

 endwhile

or

 dowhile (!search, ‘‘search text’‘)

  Statement

  Statement

  …..

 endwhile

 


It is possible to specify a beginning and ending screen location for the search in the form:

dowhile (search, "search text, 40/200")

Where 40 and 200 are screen positions.  To see how to calculate the total number of screen positions, refer to the next paragraph.

To calculate the screen size, multiply total screen rows by total columns and subtract 1.  For example, with a 24*80 screen, the search positions can range from 0 – 1919.  The above command will only search the screen for the specified text from position 40 through position 200. If the search text exists outside of the specified region, it will not be found.  To search the whole screen, omit the beginning and ending screen positions.



Next Command