Pasal Readkey問題

2006-10-28 6:22 am
請問用左READKEY之後如何讀取123456789鍵????

回答 (2)

2006-10-28 8:01 am
✔ 最佳答案
program test_readkey;
uses wincrt;
var
c : char;
begin
c:=readkey;
case c of
#8 : writeln(’You presses backspace’);
#9 : writeln(’You presses tab’);
#13: writeln(’You presses enter’);
#27: writeln(’You presses escape’);
#32: writeln(’You presses space’);
#48: writeln(’You presses 0’);
#49: writeln(’You presses 1’);
#50: writeln(’You presses 2’);
#51: writeln(’You presses 3’);
#52: writeln(’You presses 4’);
#53: writeln(’You presses 5’);
#54: writeln(’You presses 6’);
#55: writeln(’You presses 7’);
#56: writeln(’You presses 8’);
#57: writeln(’You presses 9’);
else writeln(’You presses other key’);
end;
end.

只要搵返個制既 ASCII value 就得.

2006-10-30 23:21:46 補充:
同左邊 keyboard 果 D 一樣.
2006-11-01 8:45 am
Left is the same as the right, don't worry.


收錄日期: 2021-04-12 23:57:02
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20061027000051KK04509

檢視 Wayback Machine 備份