Simple debug routine

[Autolink] Menu

 
/* 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


[Back: Using a compound variable as tail of another compound variable]
[Next: Copy the Queue into a compound variable]