Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

 


IF (search, ‘‘search text’‘) … (ELSE …) ENDIF

 

Execute a set of statements based on whether a condition is true, and optionally execute a second set if the condition is false.

 

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

  statement

  statement

  …..

 endif

or

 if (search, ‘‘search text’‘)

  statement

  statement

  …..

 else

  statement

  statement

  …..

 endif

To reverse the search condition (to execute the statements after the ‘if’ if the text was not found), put an ‘!’ directly in front of the word ‘search’ as in

 if (!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

 

 

  • No labels