new to eiffel, looking for command to equal..... 
Author Message
 new to eiffel, looking for command to equal.....

I am looking for a command to equal the old keypressed of Pascal and C.
Basically i want to loop until the user presses a key then after the
keypress I want to get the key they pressed.  Such that:

while (not)keypressed
{
    //Do some fun stuff

Quote:
}

ch := readkey();

Now in Eiffel I know I have to use a from;until;loop;end loop (the only one)
but I am not shure about the Keypressed command.  I have looked in the book
I have and on the net to no avail.  Maybe there isn't even one!?  :.)  Thx
for the Help,
Doug



Mon, 05 Apr 2004 11:46:23 GMT  
 new to eiffel, looking for command to equal.....

Quote:

> I am looking for a command to equal the old keypressed of Pascal and C.
> Basically i want to loop until the user presses a key then after the
> keypress I want to get the key they pressed.  Such that:

> while (not)keypressed
> {
>     //Do some fun stuff
> }
> ch := readkey();

> Now in Eiffel I know I have to use a from;until;loop;end loop (the only one)
> but I am not shure about the Keypressed command.  I have looked in the book
> I have and on the net to no avail.  Maybe there isn't even one!?  :.)  Thx
> for the Help

I don't remember how to put it all together, like passing arguments etc.
and linking the library, but this will get you started.

keypressed: BOOLEAN is
    external
        "C"
    alias
        "actual name of the keypressed function in the C library"
    end
--
Peter Horan                     School of Computing and Mathematics

+61-3-5227 1234 (Voice)         Geelong, Victoria 3217, AUSTRALIA
+61-3-5227 2028 (FAX)           http://www.cm.deakin.edu.au/~peter

-- The Eiffel guarantee: From specification to implementation
-- (http://www.cetus-links.org/oo_eiffel.html)



Mon, 05 Apr 2004 12:29:08 GMT  
 new to eiffel, looking for command to equal.....
Oh, I understand.... I think I might be able to figure it out from here, I
hope my book explains linking c commands into eiffel, thx for the help
Doug


Quote:

> > I am looking for a command to equal the old keypressed of Pascal and C.
> > Basically i want to loop until the user presses a key then after the
> > keypress I want to get the key they pressed.  Such that:

> > while (not)keypressed
> > {
> >     //Do some fun stuff
> > }
> > ch := readkey();

> > Now in Eiffel I know I have to use a from;until;loop;end loop (the only
one)
> > but I am not shure about the Keypressed command.  I have looked in the
book
> > I have and on the net to no avail.  Maybe there isn't even one!?  :.)
Thx
> > for the Help

> I don't remember how to put it all together, like passing arguments etc.
> and linking the library, but this will get you started.

> keypressed: BOOLEAN is
>     external
>         "C"
>     alias
>         "actual name of the keypressed function in the C library"
>     end
> --
> Peter Horan                     School of Computing and Mathematics

> +61-3-5227 1234 (Voice)         Geelong, Victoria 3217, AUSTRALIA
> +61-3-5227 2028 (FAX)           http://www.cm.deakin.edu.au/~peter

> -- The Eiffel guarantee: From specification to implementation
> -- (http://www.cetus-links.org/oo_eiffel.html)



Mon, 05 Apr 2004 13:54:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Question about feature {NONE} and equal(x,y) (Eiffel/S)

2. One and One doesn't equal two It equals 1 - The Who

3. One and One doesn't equal two It equals 1 - The Who

4. colon-equal vs equal

5. New in Eiffel Wiki: Eiffel Laboratory

6. New in Eiffel Wiki: Eiffel Laboratory

7. The Eiffel Forum - A New Eiffel User Group

8. Eiffel components: call for new contributions to the Eiffel Shelf

9. Newbie: Ugly looking command processor commands

10. (Simple) command pattern in Eiffel

11. need command line processing for Personal Eiffel

12. tcl exec command and ISE's Eiffel

 

 
Powered by phpBB® Forum Software