The following is strange. By acting on an equation label (in the Standard GUI) a subsequent global reference gets printed as if it were a module reference.

> restart:

> x:=ScientificConstants:-Constant(c);
                              x := Constant(c)

> ScientificConstants:-GetValue(x);
                                  299792458

> y:=:-Constant(hbar);
                             y := Constant(hbar)

> ScientificConstants:-GetValue(y); # expect an error
Error, (in ScientificConstants:-GetValue) `Constant(hbar)` is not a scientific constant object

> ScientificConstants:-GetValue((1)); # using equation label (1)
                                  299792458

> y:=:-Constant(hbar); # strangely printed output!
                  y := ScientificConstants:-Constant(hbar)

> ScientificConstants:-GetValue(y); # but the above output is a lie
Error, (in ScientificConstants:-GetValue) `ScientificConstants:-Constant(hbar)` is not a scientific constant object

> y:=ScientificConstants:-Constant(hbar); # same output as the lie
                  y := ScientificConstants:-Constant(hbar)

> ScientificConstants:-GetValue(y); # but now it works as expected
                                            -34
                              1.054571596 10   

Has anyone seen this for a general user-defined module?


Please Wait...