%mathpiper,def="Tell"
Macro("Tell",{id})    [Echo(<<,@id,>>);];
Macro("Tell",{id,x})  [Echo(<<,@id,>>,Hold(@x),": ",Eval(@x));];
%/mathpiper

    %output,preserve="false"
      Result: True
.   %/output

%mathpiper_docs,name="Tell",categories="Programmer Functions;Testing"

*CMD Tell --- debug routine using Echo to print ID and (optional) variable(s)

*STD
*CALL
	Tell(ID)
	Tell(ID,list)

*PARMS

{ID} -- an arbitrary identifier for this printout

{list} -- a list of items to be printed (may be a single item)

*DESC

If passed a single item, {Tell} will display it using Echo().  
The dispayed value will be enclosed with << >> (see below).
If ID consists of more than one word, it should be quoted.

If there are two arguments, the first should be an ID as above, and the second 
should be a list of variables which are bound to values at the place where
{Tell} is called.  Using Echo(), the list of variable names will be printed
out, along with a list of their currently bound values.

{Tell} can be called with any number of variable names in the list.

{Tell} always returns {True}.

Because {Tell} uses Echo(), it prints to Standard Output.  If you are debuging
a program which may hang, you may get no printout.  In that case, use {Show}
instead of {Tell}

*E.G. notest
In> var1:=123
Result: 123
In> var2:= "a string"
Result: "a string"
In> var3:=Sin(x)+Exp(x)
Result: Sin(x)+Exp(x)
In> Tell(ID1)
Result: True
	Side Effects>
	<< ID1 >>
In> Tell(ID2,{var1})
Result: True
	Side Effects>
	<< ID2 >> {var1} :  {123} 
In> Tell(ID3,{var1,var2})
Result: True
	Side Effects>
	<< ID3 >> {var1,var2} {123,"a string"} 
In> Tell(ID4,{var1,var2,var3})
Result: True
	Side Effects>
	<< ID4 >> {var1,var2,var3} :  {123,"a string",Sin(x)+Exp(x)} 


*SEE Show
%/mathpiper_docs
