Subject: get name of variable as string in function?
From: Stavros Macrakis
Date: Mon, 27 Feb 2012 13:41:24 -0500
This is (was?) a bug. It works fine in Maxima 5.25.1 on GCL 2.6.8.
What version are you on?
-s
On Mon, Feb 27, 2012 at 13:31, Edwin Woollett <woollett at charter.net> wrote:
> 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
>
>