diff options
Diffstat (limited to 'ipl/procs/wdiag.icn')
-rw-r--r-- | ipl/procs/wdiag.icn | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ipl/procs/wdiag.icn b/ipl/procs/wdiag.icn new file mode 100644 index 0000000..1364e3a --- /dev/null +++ b/ipl/procs/wdiag.icn @@ -0,0 +1,43 @@ +############################################################################ +# +# File: wdiag.icn +# +# Subject: Procedure to write values with labels +# +# Author: Ralph E. Griswold +# +# Date: March 25, 2002 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# widag(s1, s2, ...) writes the values of the global variables named s1, s2, +# ... with s1, s2, ... as identifying labels. +# +# It writes a diagnostic message to standard error output if an +# argument is not the name of a global variable. +# +# Note that this procedure only works for global variables; there is +# no way it can access the local variables of the procedure from which +# it is called. +# +############################################################################ + + +procedure wdiag(names__[]) #: write labeled global values + local wlist__, s__ + + wlist__ := [] + + every put(wlist__, " ", s__ := !names__, "=") do + put(wlist__, image(variable(s__))) | + write(&errout, image(s__), " is not a variable") + + write ! wlist__ + + return + +end |