Date: Thu, 9 Jun 2005 16:47:38 +0200
Reply-To: Georg.Maubach@dpwnbc.net
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Georg Maubach <Georg.Maubach@dpwnbc.net>
Subject: Debugging of programs
Content-Type: text/plain; charset="us-ascii"
Hi all,
we would like to use some sort of debugging mode in our programs. We
defined a macro
DEFINE @debug () 1 !ENDDEFINE .
and use it in a DO IF command. But this does not work. What are we doing
wrong?
Example:
DEFINE @debug () 1 !ENDDEFINE /* debug switched on */ .
DO IF (@debug = 1) .
ECHO 'Debugging Modus is on' .
ECHO 'Any debugging commands' .
END IF .
DEFINE @debug () 0 !ENDDEFINE /* debug switched off */ .
DO IF (@debug = 1) .
ECHO 'Debugging Modus is on' .
ECHO 'Any debugging commands' .
END IF .
Output:
Debugging Modus is on
Any debugging commands
Debugging Modus is on
Any debugging commands
In the latter case the text "Debugging Modus is on" and "Any debugging
comands" should not appear. How could we change it so that the debugging
commands are not run if the macro @debug is set to 0 with the command
DEFINE @debug () 0 !ENDDEFINE?
Best regards
Georg Maubach
Market Analyst
Deutsche Post World Net Business Consulting GmbH
Market Research Service Center
mailto:georg.maubach@dpwnbc.net