SlickEdit Community

SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: flethuseo on October 13, 2016, 04:28:08 pm

Title: How to have find stop at end of file?
Post by: flethuseo on October 13, 2016, 04:28:08 pm
How can I have the find only execute up to the point where it reaches the end of the file?

Code: [Select]
   int not_found = find('printf("',"IP?+"); /* boolean to terminate loop */

   while (!not_found) {
      _deselect();
      next_word();
      cursor_right(2);
      paste();
      not_found = find('printf("',"IP?+");
   }
Title: Re: How to have find stop at end of file?
Post by: Lee on October 13, 2016, 05:47:53 pm
For the find command, P is Wrap and P? is Prompt Wrap, instead of arguments "IP?+", just use "I+".