Author Topic: How to have find stop at end of file?  (Read 3577 times)

flethuseo

  • Senior Community Member
  • Posts: 177
  • Hero Points: 2
How to have find stop at end of file?
« 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?+");
   }

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: How to have find stop at end of file?
« Reply #1 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+".