HP Forums
[INCONSISTENCY] No Sintax error when variable is lowercase on Solve app - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: [INCONSISTENCY] No Sintax error when variable is lowercase on Solve app (/thread-1687.html)



[INCONSISTENCY] No Sintax error when variable is lowercase on Solve app - alexzkter - 06-22-2014 12:18 PM

Solve app needs to be improved...

Define these variables on Home, for instance:
Quote:m:=0
k:=0

Go to Solve App and type in the following equations:

Quote:m(k+2)
(k+2)m

The editor only adds the product symbol (*) in the last equation.
If you numeric evaluate the first equation, you can't change the value of m, it just doesn't show up.[Image: 5uome8.png]

If instead of m(k+2) you type in M(k+2), the editor shows up the sintaxys error message that should've come up too when typing in the first equation.
[Image: 2j8jyq.png]


This was an obvious example, but when dealing with longer equations you are likely to forget about adding the product symbol in the equation and get wrong answers.


RE: [INCONSISTENCY] No Sintax error when variable is lowercase on Solve app - Wes Loewer - 06-22-2014 01:28 PM

I don't know if this would be a bug or not. The m(k+2) is being parsed as the function m of k+2 which works just fine if m(x) is defined.

The Prime behaves the same at the TI 89/Nspire in this regard. If you want m*(k+2), you have to explicitly indicate the multiplication. Otherwise it's treated as a function.

Since big M can't be a function, the error message makes sense.

-wes


RE: [INCONSISTENCY] No Sintax error when variable is lowercase on Solve app - cyrille de brébisson - 06-23-2014 06:01 AM

Hello,

Wes Loewer hit it on the head... m(??) is a valid syntax since m could be anything, including a list, vector or function... so the system will not add an implicit *...

however, (???)m is non ambiguous...

implicit * is a bad thing, but for some reason, math teachers did insist on it... but it causes more troubles than it solves...

cyrille