Andreas Enge on Fri, 28 Nov 2014 11:51:05 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: new GP functions varhigher / varlower


Hello,

very interesting new functions!

On Wed, Nov 26, 2014 at 07:11:46PM +0100, Karim Belabas wrote:
>   varhigher(name, {v}): return a variable 'name' whose priority is higher than
>   the priority of v (of all existing variables if v is omitted).
> 
> 1) [WONTFIX] variables created via varhigher / varlower can not be accessed by
> typing their name (or the quote operator 'foo). This is by design: the same
> (display) string can be associated to many variables. A given symbol can be
> associated to only one of them.

I understand that this applies to the programmer's responsability, but is
their a potential use for this confusing behaviour? Local variables?
But as I understand it, these symbols are global anyway?

How about checking unicity of the string?

Or dropping the first argument? This would only work in assignments,
however: t=varhigher() could create a variable with string "t".

Andreas