A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

restart;
ScientificConstants:-GetValue(Constant(g))

Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

 

 

 

We suggested to either

[Edit May 13 after Acer's improvements]

A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

restart;
with(ScientificConstants):
GetValue(Constant(g));

9.80665

(1)

Download scientificConstantsGetValueShortFormsWithPackage.mw

or

B) use long forms for both command names:

restart;
ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormLongForm.mw

or

C) to test that a long form command and a short form command work together, import the package for the short form command:

restart;
with(ScientificConstants):
ScientificConstants:-GetValue(Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormWithPackage.mw

Further details can be found in the article ?UsingPackages


Please Wait...