914.0.1
DEBUG system variable now defined, to aid application development debugging.
In COMPIL /X:2 (A-Shell extensions), DEBUG is treated as a system variable (e.g. like CMDLIN, DATE, TIME, etc.) rather than an ordinary variable. However, to avoid breaking existing programs which use DEBUG as an ordinary variable, any MAP statement for a variable named DEBUG will cancel the special interpretation of DEBUG as a system variable. (The only remaining potential for conflict with existing program would be if you used DEBUG as an ordinary variable with mapping it, in which case you should be embarrassed at your sloppy programming habits, and you will get a compiler syntax error for any statements which attempt to assign a value to DEBUG.)
The DEBUG system variable can be set in three ways:
The first is to use the COMPIL /DEBUG switch, in which the program is compiled as if the variable DEBUG was hardcoded to 1. When set this way, it cannot be turned off at runtime, so would probably only be useful during program development.
The second way to set it at runtime, using SET.LIT (SET DEBUG or SET NODEBUG). This will cause the same effect as compiling with the /DEBUG switch, except it is not hard-coded into the program (i.e. it can be turned on and off without recompiling.)
The third way is to use XCALL MIAMEX,144...
xcall MIAMEX,MX'DEBUG,OP,DBGFLG (MX'DEBUG=144)
Where OP=0 to retrieve the current value of the system variable DEBUG (in the ordinary variable DBGFLG), and OP=1 to set it.
Regardless of how DEBUG is set, you can reference it as a read-only variable within your programs to conditionally execute debugging code, i.e.:
IF DEBUG THEN XCALL MSGBOX,...
914.0.2
COMPIL.LIT 1.0(116) updated to support /DEBUG switch.
914.0.3
SET.LIT 1.2(144) updated to support the {NO}DEBUG switch:
SET DEBUG {#}
SET NODEBUG
(SET DEBUG is equivalent to SET DEBUG 1; higher debug levels, up to 9, can be specified and interpreted as you like within your applications.)
914.0.4
A new subroutine, EVTMSG.SBX, has been released into the Open Source Library (available at http://www.a-shell.net/cgi-bin/ultimatebb.cgi). See doc of this name for more info.
914.0.5
Fix problem with "double-bounce" of keys on numeric keypad during AUI,"EVENTWAIT" operation.