| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Rexx |
DW> getting a stack full error after about 45 entries into a
DW> looping routine similar to the one that follows.
DW> -- start here ---
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> R1:
DW> SAY " You entered "'R'
DW> call M1
You keep calling functions and never return, thus you eventually fill up
the space reserved for holding return information.
Try putting the keyboard routine in a loop which calls subroutines,
which return when done (note that you will need to add an option to break
out of the keyboard loop). If you will have more than a few options, it
will be easier to use Select When than a forrest of If Thens.
Do Forever
Key = SysGetKey( NoEcho )
Select
When Key = "R" | Key = "r" Then
Call R1
When Key = "Q" | Key = "q" Then /* break out of loop */
Leave
Otherwise /* default action */
Call Beep 1000,100
End
End
Exit /* terminates CMD execution so we don't start running the */
/* following subroutines */
R1:
Say " You entered "'R'
Return
Jeff
--- timEd/2 1.00
* Origin: Quibbler's Say (1:2410/242)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: 2410/242 165 10 116 3615/50 229/2 12/2442 711/409 54/54 711/808 809 @PATH: 711/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™.