1. Euphoria Program

I'm still new to the Euphoria programming language, and could use some =
help with just a little test I'm writing.  I'm just trying to get the =
syntax and whatnot down.  Here's the program:

include mouse.e
atom i, j
i =3D 1

while i < 113 and i > 113 do
        i =3D get_key()
        j =3D get_mouse()
        ? j
end while

        Basically what I want to do is just print the event and coordinates of =
the mouse.  I'd like the program to stop when I press q.  Thanks in =
advance for any information.

______________________________________
Michael R. York
Database Coordinator/Development Department
Phone:  (610)647-4400 x3137
Fax:  (610)251-1668
Email: myork at immaculata.edu

new topic     » topic index » view message » categorize

2. Re: Euphoria Program

At 12:06 PM 7/28/99 -0400, you wrote:
>        I'm still new to the Euphoria programming language, and could use
>some help with just a little test I'm writing.  I'm just trying to get the
>syntax and whatnot down.  Here's the program:
>
>include mouse.e
>atom i, j
>i = 1
>
>while i < 113 and i > 113 do
>        i = get_key()
>        j = get_mouse()
>        ? j
>end while
>
>        Basically what I want to do is just print the event and coordinates
>of the mouse.  I'd like the program to stop when I press q.  Thanks in
>advance for any information.

The problem is, i can't be BOTH less than 113 AND greater than 113...

Use one of the following...

while i <> 13 --while 'i' is NOT 113

-OR-

while i < 113 or i > 113 do

-ck

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

3. Re: Euphoria Program

Hello,

Michael R. York wrote:

>         I'm still new to the Euphoria programming language, and could use
>some help with just a little test I'm writing.  I'm just trying to get the
>syntax and whatnot down.  Here's the program:
>
>include mouse.e
>atom i, j
>i = 1
>
>while i < 113 and i > 113 do
>         i = get_key()
>         j = get_mouse()
>         ? j
>end while
>
>         Basically what I want to do is just print the event and
>coordinates of the mouse.  I'd like the program to stop when I press q.
>Thanks in advance for any information.
>
>______________________________________
>Michael R. York
>Database Coordinator/Development Department
>Phone:  (610)647-4400 x3137
>Fax:  (610)251-1668
>Email: myork at immaculata.edu

make that:

while get_key() != 'q' do
         ? get_mouse()
end while

hope this helps,
Lewis Townsend


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

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

4. Re: Euphoria Program

C. K. Lester wrote:

> while i <> 13 --while 'i' is NOT 113

Perhaps what was meant was:

  while i != 113

Although I think the following is a bit clearer:

   while get_key() != 'q' do
      ? get_mouse()
   end while

-- David Cuny

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

5. Re: Euphoria Program

DOH! Yes, '<>' means "is not equal to" in one of these other languages I
have to use for programming... smile

At 09:35 AM 7/28/99 -0700, you wrote:
>C. K. Lester wrote:
>
>> while i <> 13 --while 'i' is NOT 113
>
>Perhaps what was meant was:
>
>  while i != 113
>
>Although I think the following is a bit clearer:
>
>   while get_key() != 'q' do
>      ? get_mouse()
>   end while
>
>-- David Cuny

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

6. Re: Euphoria Program

I knew what you meant, no big deal, man.  Thanks for the help.

______________________________________
Michael R. York
Database Coordinator/Development Department
Phone:  (610)647-4400 x3137
Fax:  (610)251-1668
Email: myork at immaculata.edu

----------
From:   C. K. Lester[SMTP:cklester at TICNET.COM]
Sent:   Wednesday, July 28, 1999 4:55 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Re: Euphoria Program

DOH! Yes, '<>' means "is not equal to" in one of these other languages I
have to use for programming... smile

At 09:35 AM 7/28/99 -0700, you wrote:
>C. K. Lester wrote:
>
>> while i <> 13 --while 'i' is NOT 113
>
>Perhaps what was meant was:
>
>  while i != 113
>
>Although I think the following is a bit clearer:
>
>   while get_key() != 'q' do
>      ? get_mouse()
>   end while
>
>-- David Cuny

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

7. Re: Euphoria Program

Thanks Guys Much obliged


John

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

Search



Quick Links

User menu

Not signed in.

Misc Menu