HP Forums

Full Version: Reader's digest: The HP Prime heritage on case sensitivity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
While checking my HP-28S documentation, most from the MoHPC DVD, I also have accessed an interesting document in the net titled as An Aeronautical Engineerings user's manual to the HP-28S handheld calculator. (1991)

And in this document the author mention this interesting observation on the HP-28S case behavior (page 10) , which reminds me of the similar HP-Prime behavior despite on a different context:

CASE SENSITIVITY
The programs listed herein must be typed into the HP-28S
exactly as shown. It is crucial to observe upper and lower
case carefully. In the calculator, 'I' and 'x' might have
been defined to represent two different values; in fact, one
could be a complex number or a string, and the other could be
a matrix!
Note for example that the statement "sin=5', using all
lowercase letters, is perfectly legal, and assigns the value
5 to the variable named 'sin'. The sine trig function is
called SIN, with all uppercase letters, and neither this
function nor the 'sin' variable is equivalent to another
variable named 'Sin'!
To further confuse things, all upper and lower case
characters are displayed only in upper case on the softkey
display. Thus, two variables 'X' and 'x' could both appear
simultaneously as 'X' on the display.
Hmmm. I would consider the behaviour described in the text being the result of case sensitive input. I don't see a real parallel to the prime. There is no auto-correction of templates mentioned. He can assign everything to any variable (if no reserved word of course). There is no need of changing the typing during usage etc. I agree with the last aspect. That is bad, but the prime gives lower and upper case letters in the display.
What triggered your mind? Or can you say it was the author's confusion some users experience with the prime?
Dear All,

for anyone interested in this book it is available here in pdf format.

Best regards

Karl
(09-01-2014 04:49 AM)Angus Wrote: [ -> ]Hmmm. I would consider the behaviour described in the text being the result of case sensitive input. I don't see a real parallel to the prime. There is no auto-correction of templates mentioned. He can assign everything to any variable (if no reserved word of course). There is no need of changing the typing during usage etc. I agree with the last aspect. That is bad, but the prime gives lower and upper case letters in the display.
What triggered your mind? Or can you say it was the author's confusion some users experience with the prime?

I see what you mean and agree with you on all points.
However I would like to clarify one aspect:
This confusion comes from the machine's project designers, not from the the users. As i see it, the users are the victims here.

Even with very well documented features and behaviors (and we all know that this is not the case in most of the projects due to a number of good reasons, no matter what manufacturer we are talking about here), if something is not consistent or is implemented in a non efficient way from the operation point of view, it is still the manufacturer's fault, not the user's fault.

But I was not looking into specific details, I was just pointing out that this calculator designer's confusion between uppercase/lowercase command and variables in distinct environments (CAS vs Home) in the Prime has got an heritage from the 28 series machines where similar designers confusion were detected by the users at the time (the 28 series were the first world pocket calculators to feature symbolic calculus if I'm not wrong).

The whole concept of distinguish between lowercase and uppercase chars looks fine to me, as long as the machine can maintain the behavior consistency/integrity between the offered distinct environment modes (Home vs CAS).
The Prime has space for improvement here, as discussed by many posters in these forums.

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.
Your point is mine... I'm no fan of the typo-bohu.
Let's hope they will work on that part and not only focus on the "ipad of the calculators" thing.
(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.
(09-10-2014 07:00 AM)Karl-Ludwig Butte Wrote: [ -> ]Dear All,

for anyone interested in this book it is available here in pdf format.

Best regards

Karl

Thanks!
Reference URL's