TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Donald Woolwine
from: Bob Liles
date: 1994-10-22 09:04:00
subject: Rexx 1/2

DW>/*  TESTHOT.CMD   --  testing out hotkeys */
DW>call rxfuncadd 'SysGetKey', 'RexxUtil', 'SysGetKey'

DW>M1:
DW>Say 'Press any key to continue'
DW>key = SysGetKey(noecho)

DW>IF key='r'
DW>   THEN
DW>     CALL R1

DW>   ESLE CALL T1

DW>IF key='R'
DW>   THEN
DW>    CALL R1
DW>   ESLE CALL T1

DW>R1:
DW>SAY " You entered "'R'
DW>call M1

DW>T1:
DW>SAY " I DON'T UNDERSTAND, TRY AGAIN"
DW>CALL M1

DW>stack full message but I can find no info on removing the problem or clearing
DW>the stack. My only source of ref is the on-line info with came with OS/2 and
DW>what little info OS/2 Unleashed. Any help would be appriciated. Thank you

Called routines MUST end with a RETURN.  Use the command SIGNAL to
actually jump to another label, as in SIGNAL M1 used below.  Try this
procedure:

/*  TESTHOT.CMD   --  testing out hotkeys */
call rxfuncadd 'SysGetKey', 'RexxUtil', 'SysGetKey'

M1:
Say 'Press any key to continue'
key = SysGetKey(noecho)

IF key='r'
   THEN
     CALL R1

   ELSE CALL T1   /* corrected spelling of ESLE */

IF key='R'
   THEN
    CALL R1
   ELSE CALL T1   /* corrected spelling of ESLE */

SIGNAL M1         /* this is REXX's GOTO command */

R1:
SAY " You entered "'R'
RETURN  /* this replaces "call M1" */

T1:
SAY " I DON'T UNDERSTAND, TRY AGAIN"
RETURN /* this replaces "CALL M1" */

Or, replace all the CALL commands with SIGNAL and it will work as you
desire.  Try the following. (Unnecessary stuff deleted.)

/**/
call rxfuncadd 'SysGetKey', 'RexxUtil', 'SysGetKey'

M1:
Say 'Press any key to continue'


.
--- QScan v1.131b / 01-0169

* Origin: The Party Line * Memphis * 901-755-4531 (1:123/5)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 123/5 4 301 3615/50 229/2 12/2442 711/409 54/54 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™.