read cursor key 
Author Message
 read cursor key

Sorry about that!  Maybe I placed a wrong question!  Yes I know the
readln!  But my question is what is the command affter getting ten
numbers - what is the command for verifying if the ten numbers belong to
odd or even?  And how can I display them in odd and even column?  Hoping
for your kind consideration!  Thanks
Quote:

> How do I do ... ?

> - ask user to press any cursor or function key
> - if cursor key or function is pressed, do something



Wed, 18 Jun 1902 08:00:00 GMT  
 read cursor key

Quote:
> Sorry about that!  Maybe I placed a wrong question!  Yes I know the
> readln!  But my question is what is the command affter getting ten
> numbers - what is the command for verifying if the ten numbers belong to
> odd or even?  And how can I display them in odd and even column?  Hoping
> for your kind consideration!  Thanks

for i := 1 to 10 do
  begin
    if odd(number[i]) then
      GotoXY(10, i)
    else
      GotoXY(50, i);
    write(number[i])
  end;

--
______________________________________________________________________
     The Scarlet Manuka,      |        Nitpickers' Party motto:
  Pratchett Quoter At Large,  |  "He who guards his lips guards his
 First Prophet of Bonni, is:  |  soul, but he who speaks rashly will

______________________________|_______________________________________



Wed, 18 Jun 1902 08:00:00 GMT  
 read cursor key

Quote:

>How do I do ... ?

>- ask user to press any cursor or function key
>- if cursor key or function is pressed, do something

There seems to be a certain amount of cross-talk
in this thread.

To find out how to read cursor key depressions (or any
other key) you should consult Prof. T. Salmi's Pascal FAQs,
posted in this forum once every week. Question 3 in
FAQPAS1 addresses precisely your question.

KlausL



Wed, 18 Jun 1902 08:00:00 GMT  
 read cursor key
Thank you very much!
Quote:


> > Sorry about that!  Maybe I placed a wrong question!  Yes I know the
> > readln!  But my question is what is the command affter getting ten
> > numbers - what is the command for verifying if the ten numbers belong to
> > odd or even?  And how can I display them in odd and even column?  Hoping
> > for your kind consideration!  Thanks

> for i := 1 to 10 do
>   begin
>     if odd(number[i]) then
>       GotoXY(10, i)
>     else
>       GotoXY(50, i);
>     write(number[i])
>   end;

> --
> ______________________________________________________________________
>      The Scarlet Manuka,      |        Nitpickers' Party motto:
>   Pratchett Quoter At Large,  |  "He who guards his lips guards his
>  First Prophet of Bonni, is:  |  soul, but he who speaks rashly will

> ______________________________|_______________________________________



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. read cursor keys

2. Reading function/cursor keys

3. Source Code For Using Function Keys or Cursor Keys - Help :)

4. Source Code For Using Function Keys or Cursor Keys - H

5. How to put cursor-keys in keyboard buffer??

6. !!! Help, Cursor Keys

7. How control Cursor-Keys with TPW 1.5 in a WinCRT-Window

8. How control Cursor-Keys with TPW 1.5 in a WinCRT-Window

9. Cursor Keys

10. How to get cursor key events ?

11. Blinking cursor in read-only DBMemo

12. Q: Reading cursor position in TDBGrid

 

 
Powered by phpBB® Forum Software