get name of variable as string in function?



On Feb. 2, 2012, Stavros Macrakis wrote:
--------------------------
>I suggest you keep things simple and modular:
>
>/* The worker function */
>mprintx(name,val) := print(sconcat("  ",name," = "),val)$
>
>mprint('a,a)$
>[snip]
----------------------------------
How can I get nil to display as false and t to
display as true?

---------------------------------
(%i1) [a:false,b:true]$

(%i2) mprintx(name,val) := print(sconcat("  ",name," = "),val)$

(%i3) mprintx('a,a);
  a =  nil 
(%o3) false

(%i4) mprintx('b,b);
  b =  t 
(%o4) true   
   ---------------------
 Ted