Translate page

DO...WHILE

 


DO . . . WHILE (search,’‘search text’‘)

 

The ‘do…while’ command can be used to execute a set of statements repeatedly until a specified condition is met, at which point processing will continue with the first line after the ending ‘while’ condition. The condition must be a ‘Search’ command that evaluates to true or false.

 

NOTE: This command will always execute at least once, since the condition is not evaluated until the end of the loop.

 

Usage: do

  Statements

  Statements

  …..

 while (search, ‘‘search text’‘)

or

 do

  Statements

  Statements

  …..

 while (!search, ‘‘search text)

 


// which proceeds to the next line when it does not find the search text. Note that this format only occurs when you check the Invert Condition checkbox on the search text entry dialog.

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

while (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