functions from add-on packages, was: Newbie question: testing for lvalue



Am 31 Dec 2006 um 17:50 hat Robert Dodier geschrieben:

Hi Robert, happy new year!

if there is no example included in the documentation of a function, which shows that a 
load("add-on") is necessary, the user in a lot of cases gets no information, that this function 
is from an add-on package. This is true for stringproc and a lot of others. 

Should we revise the add-on package documentations and add a "please load(xyz) first" to 
every function definition or is there a possibility, that describe itself gives a short 
information, like

(%i1) ? stringp
 0: lstringp  (Definitions for strings, add-on package stringproc)
 1: stringp  (Definitions for strings, add-on package stringproc)
Enter space-separated numbers, `all' or `none': 

What would you recommend?

All the best,
Volker

> On 12/31/06, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
> 
> > Hmm, a string is not an lvalue (something that can appear on the
> > left hand side of an assignment).  "describe" claims that there is
> > a function "stringp" but on my version of maxima stringp appears
> > not to do anything. Is this a bug?
> 
> It turns out stringp is defined in an add-on package (namely stringproc).
> Probably it should move into the main source code.
> Be that as it may, the function ?mstringp has the desired effect.
> So we can update the test function to
> 
> P(e) := (symbolp(e) or subvarp(e)) and not ?mstringp(e);
> 
> Sorry, I could have included that to begin with. Hope this helps.
> 
> Robert