Re: Find what?

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: Brian Broker <bkb at CNW.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Tuesday, November 07, 2000 4:41 PM
Subject: Re: Find what?


> On Mon, 6 Nov 2000 21:24:52 -0800, Thomas wrote:
>
> >      Sorry, I meant to add another "bit" to it. I forgot to include that
> >the users input was used in find(). So it would be something like:
> >
> >      include get.e
> >
> >      integer input
> >      sequence word
> >      word="beef"
> >      atom findit
> >       input=gets(0)
> >      findit=find(input[1], word)    --input[1] otherwise the [#,10]
extra
> >                                     --10 for enter is added
> >      ? findit
> >
> >
> >      --->Thanks
> >      ------> Thomas
>
> So what is your question?
>
> If I input "beer", I will get:
>   find( 'b', "beef" ) = 1
>
> If I input "elephant", I will get:
>   find( 'e', "beef" ) = 2
>
> If I input "pork", I will get:
>   find( 'p', "beef" ) = 0
>
> If I input "Beef", I will get:
>   find( 'B', "beef" ) = 0
>
> Is this what you want?  If not, provide examples like those above and the
> result you would like to see.  Then we'll see about writing a function
that
> produces the desired results.  Are you looking for a function
> like "find_all" or "match_all" that I posted previously?
>
> -- Brian


Um............how about we forget what I wrote. Sorry I've got a lot of
stuff buzzing aroudn right now so I've gotten sidetracked. What I mean is,
if the user enters "e" and Euphoria find()'s "e" in "beet", there are 2.
What happens then? Does Euphoria give you the placement of the first "e".

Sorry for the confusion...

Thomas

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu