| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pl/i Query |
Hello David--
On 11-24-95, I posted a message to you that included the following
query:
> Technical question: I have been unable to find a PL/I construct
> equivalent to the REXX CHARIN() (e.g., no required), other than
> to build one from the KBDCharin() API call. Any suggestions?
I must have been suffering from too much travel when I wrote it.
Obviously, a PL/I equivalent to CHARIN is REPLY. What I should have
been asking for is the PL/I equivalent of _getch; I want to block on the
keyboard until a character is entered, then read that character.
The following is a code fragment I used to test multithreading:
..... test1.pli starts on next line....
test1: proc options (main);
dcl X char(80) var; /* dummy variable, just to capture */
dcl TI1 TASK;
attach Blooper THREAD (TI1);
display ('');
display (' Press ENTER to stop beeping') REPLY (X);
detach THREAD (TI1);
exit;
Blooper: entry () OPTIONS (LINKAGE(SYSTEM));
dcl DosBeep entry (
unsigned bin fixed(31),
unsigned bin fixed(31))
RETURNS(bin fixed(31) optional)
OPTIONS (LINKAGE(SYSTEM) NODESCRIPTOR BYVALUE);
do loop;
call DosBeep(523,500);
delay(500);
end;
end test1;
.....test1.pli ends on previous line
What I want to do is replace the message "Press ENTER to stop
beeping" with "press any key to stop beeping" and have it work
correctly! Among other problems, I am producing beaucoup error
messages when I try to call DosBeep by including OS2.CPY instead of
having the prototype in the program. Which means that I will have much
trouble building the equivalent to _getch from KBDCharin, also.
Any suggestions?
Thanks, chief.
--Murray
___
* MR/2 2.25 #120 * Never send a PM program to do a text-mode job
---
* Origin: 2" x 4" bbs - a basic board - (914) 271-9407 (1:2625/108)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 517 628 713/888 800/1 7877/2809 @PATH: 2625/108 1 2606/583 2605/606 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.