Technique: Test environment
Walter Pachl from Vienna sent me the proof of errors in one my subprogram. Its code is ingeniously simple test environment.
signal on HALT
signal on NOVALUE
signal on SYNTAX
...
code of debugging program
...
NOVALUE:
say 'Novalue raised in line' Sigl
say SOURCELINE(Sigl)
say 'Variable' CONDITION('D')
signal LOOKAROUND
SYNTAX:
say 'Syntax raised in line' Sigl
say SOURCELINE(Sigl)
say 'rc='rc '('ERRORTEXT(rc)')'
HALT:
LOOKAROUND:
do
say 'You can look around now.'
trace ?R
nop
end
exit 12
|
CO-AUTHOR