Post Reply 
Reader's digest: The HP Prime heritage on case sensitivity
09-10-2014, 02:38 PM (This post was last modified: 09-10-2014 02:40 PM by jebem.)
Post: #6
RE: Reader's digest: The HP Prime heritage on case sensitivity
(09-10-2014 10:25 AM)jebem Wrote:  Just a small example of this bad behavior that the users will face after 10 minutes playing with the machine:
- Type an expression in CAS mode using "x" variable (it will be entered as lowercase), for instance a simple definite integral and verify that the correct result is displayed in CAS;
- Now copy the expression into the Home mode and try to get the result: you will get an syntax error instead.
To fix this, the confused user need to manually edit the expression and replace the lowercase variable names with uppercase ones.
Now, I don't see any advantage in this Prime behavior, but maybe others may have a good explanation for this.

To partially answer my own question above, concerning the integral example.
The integral I have used is: int(sin(x),x,0,3)

I just overlooked one obvious feature in Prime:
The variables are shared between the Home and CAS mode.
Variables defined in CAS mode will be available in Home mode as well.
The same is true for variables defined in Home mode being visible in CAS mode.
However, in Home mode, predefined uppercase variables do exist.

Now, in CAS mode you do not need to declare a variable in order to reference it in a expression like the above integral. The result will be exact and the approximate value can be obtained as well.

However the same is not true when executing the same integral in Home mode, because that lowercase "x" variable doesn't exist predefined!
That's why we get a syntax error - unfortunately the message is poor IMHO as it should be more precise, like "Variable "x" not defined".

So, to run the above integral in Home mode, we have two options:

A) Rewrite the expression using the Home mode uppercase predefined variables;

B) Declare a new lowercase variable (in this example, "x") before running the expression. To declare a variable, one just needs to assign a value to it from either Home or CAS modes.

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Reader's digest: The HP Prime heritage on case sensitivity - jebem - 09-10-2014 02:38 PM



User(s) browsing this thread: 1 Guest(s)