1. Find

------=_NextPart_000_0029_01C040CA.BD428A80
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,=20

    I'm currently working on a program that uses find, but I've hit a =
problem using find. Here's an example of what my problem is:

include get.e
sequence names
object input
integer location


input=3Dwait_key()
names =3D{"m","p","n"}
location =3D find(input,(names))

What I'm trying to do is to get the users input and have Euphoria try to =
match that with one of the pre-set words. But, I'm having some trouble. =
I've already looked over the HTML's and ABGTE2, but I haven't been able =
to solve the problem. Can you help?

-Thanks=20
-Thomas

-------/\=3D=3D=3D=3D






------=_NextPart_000_0029_01C040CA.BD428A80
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all, </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I'm currently =
working on a=20
program that uses find, but I've hit a problem using find. Here's an =
example of=20
what my problem is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>include get.e<BR>sequence =
names<BR>object=20
input<BR>integer location<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>input=3Dwait_key()<BR>names=20
=3D{"m","p","n"}<BR>location =3D find(input,(names))</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What I'm trying to do is to get the =
users input and=20
have Euphoria try to match that with one of the pre-set words. But, I'm =
having=20
some trouble. I've already looked over the HTML's and ABGTE2, but I =
haven't been=20
able to solve the problem. Can you help?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Thanks </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Thomas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-------/\=3D=3D=3D=3D<BR></DIV></FONT>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_0029_01C040CA.BD428A80--

new topic     » topic index » view message » categorize

2. Re: Find

On Sat, 28 Oct 2000 10:35:06 -0700, Paul Kerslake <paulk at UNISERVE.COM>
wrote:

>Hi all,
>
>    I'm currently working on a program that uses find, but I've hit a
problem using find. Here's an example of what my problem is:
>
>include get.e
>sequence names
>object input
>integer location
>
>
>input=wait_key()
>names ={"m","p","n"}
>location = find(input,(names))
>
>What I'm trying to do is to get the users input and have Euphoria try to
match that with one of the pre-set words. But, I'm having some trouble.
I've already looked over the HTML's and ABGTE2, but I haven't been able to


  Thomas:
    wait_key returns a integer

  You would have to do this.

  input=wait_key()
  names ={'m','p','n'} <<---  use single quote here
  location = find(input,(names))

  Double quote gives you {m} a sequence containing the letter m
  Single quote gives you 109 the ASCII number for the letter

  Bernie

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu