Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 3 Forum
Date: Wed Sep 26 2001 2:22 pm
Author: Durham, Patrick K. <durham@cmu.edu>
Subject: search function

Let's suppose "mark" equals 15.

I understand the search function begins looking in line 15 for the next occurance of the word passed to the function. If the word DOES occur in line 15, should the function just return 15?

Also, if the word occurs multiple times in line 15, then is it okay for the search function to simply stop at the first occurrence? (This wouldn't make for a very robust "next occurrence" search algorithm, in real life.)
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
search function      Durham, Patrick K.      Wed Sep 26 2001 2:22 pm       
Re: search function      White, David      Wed Sep 26 2001 3:31 pm       
Re: search function      Chen, Richard      Thu Sep 27 2001 12:15 am       
Re: search function      Cipriani, Jason A.      Thu Sep 27 2001 11:24 am       
Re: search function      White, David      Thu Sep 27 2001 11:49 am       
Re: search function      White, David      Thu Sep 27 2001 11:52 am       
Re: search function      Danish, Matt R.      Fri Sep 28 2001 11:44 am       
Re: search function      Cipriani, Jason A.      Fri Sep 28 2001 5:32 pm       
Re: search function      Yuen, John      Thu Sep 27 2001 12:06 pm       

Back to previous screen