REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Simple debug routine





 
/* example for a simple debug procedure to show the contents of one   */
/* or more variables                                                  */

                        /* example call                               */
  call ShowVariables "TestVar1" "TestVar2" "TestVar3"

  /* ... */

/* ------------------------------------------------------------------ */
/* show contents of one ore more variables                            */
/*                                                                    */
/* Usage: ShowVariables var1 {...} {var#}                             */
/*                                                                    */
ShowVariables:
  parse arg DebugVarNames

  do i = 1 to words( DebugVarNames )
    debugVarName=word( debugVarNames,i )
    say "  The value of the variable '" || DebugVarName || ,
        "' is : "' || value( debugVarName ) || "'"
  end /* do i = 1 to words( debugVarName ) */

  drop debugVarName debugVarnames
RETURN

  

Inf-HTML End Run - Successful