Post Reply 
Why do commands behave inconsistently?
03-24-2020, 09:32 PM (This post was last modified: 03-25-2020 03:13 PM by Orome.)
Post: #1
Why do commands behave inconsistently?
If I have a list in Home and choose List > REVERSE from the toolbox, I get a reversed list as a result, but if I have a list and choose List > SORT, I get the list followed by SORT(), which can't be evaluated.

For example, if I have
{2, 5, 8, 3, 6, 9}
and choose List > REVERSE I get
{9, 6, 3, 8, 5, 2}
but if I instead choose List > SORT I get
{2, 5, 8, 3, 6, 9} SORT()
which is unusable.

Why do these behave differently, and how am I supposed to know that they do?
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 03:15 AM
Post: #2
RE: Wy do commands behave inconsistently?
(03-24-2020 09:32 PM)Orome Wrote:  If I have a list in Home and choose List > REVERSE from the toolbox, I get a reversed list as a result, but if I have a list and choose List > SORT, I get the list followed by SORT(), which can't be evaluated.

For example, if I have
{2, 5, 8, 3, 6, 9}
and choose List > REVERSE I get
{9, 6, 3, 8, 5, 2}
but if I instead choose List > SORT I get
{2, 5, 8, 3, 6, 9} SORT()
which is unusable.

Why do these behave differently, and how am I supposed to know that they do?

I tried this on many emulators and a real calculator.
I used RPN and Algebraic.
It always worked correctly

Perhaps you do not have the latest software?
– –
VPN
Find all posts by this user
Quote this message in a reply
03-25-2020, 10:07 AM
Post: #3
RE: Wy do commands behave inconsistently?
(03-24-2020 09:32 PM)Orome Wrote:  If I have a list in Home and choose List > REVERSE from the toolbox, I get a reversed list as a result, but if I have a list and choose List > SORT, I get the list followed by SORT(), which can't be evaluated.

For example, if I have
{2, 5, 8, 3, 6, 9}
and choose List > REVERSE I get
{9, 6, 3, 8, 5, 2}
but if I instead choose List > SORT I get
{2, 5, 8, 3, 6, 9} SORT()
which is unusable.

Why do these behave differently, and how am I supposed to know that they do?

Both work OK for me. See attachment.


Attached File(s) Thumbnail(s)
   

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-25-2020, 01:32 PM (This post was last modified: 03-25-2020 01:33 PM by Orome.)
Post: #4
RE: Wy do commands behave inconsistently?
CyberAngel Wrote:  I tried this on many emulators and a real calculator.
I used RPN and Algebraic.
It always worked correctly

Perhaps you do not have the latest software?

I've tried it (in both Algebraic and RPN) on the (latest) iOS and macOS apps, and hardware calculators with the latest (2.1.1.14433 / 2020 01 21 on a D) and some of the earliest (2013 11 25 / 5447 on an A) software.

It behaves as I describe above on all except the very old software, were it works as expected. A recently introduced bug, perhaps?
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 03:09 PM
Post: #5
RE: Wy do commands behave inconsistently?
(03-25-2020 01:32 PM)Orome Wrote:  
CyberAngel Wrote:  I tried this on many emulators and a real calculator.
I used RPN and Algebraic.
It always worked correctly

Perhaps you do not have the latest software?

I've tried it (in both Algebraic and RPN) on the (latest) iOS and macOS apps, and hardware calculators with the latest (2.1.1.14433 / 2020 01 21 on a D) and some of the earliest (2013 11 25 / 5447 on an A) software.

It behaves as I describe above on all except the very old software, were it works as expected. A recently introduced bug, perhaps?

I can't replicate it either. Maybe you could share a specific set of instructions on how to get this behavior?
Find all posts by this user
Quote this message in a reply
03-25-2020, 03:26 PM
Post: #6
RE: Why do commands behave inconsistently?
victorvbc Wrote:  I can't replicate it either. Maybe you could share a specific set of instructions on how to get this behavior?

See videos:

#StayTheFuckHome
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 03:29 PM
Post: #7
RE: Wy do commands behave inconsistently?
I have tried to confirm Orome's REVERSE() and SORT() lists, using both the posted list, and other lists, in both [HOME] and [CAS]. After lots of testing, I have not had ANY problem show up.

In earlier versions, there were times when the various models would behave in strange ways, after a lot of programming, or entry line activities. Whenever that would happen, I found that, (for example, on the VC), performing a Calculator | Reset, (from the menu bar), cleared the problem.

It is important to have a current backup, before doing that Reset. Using the CK, "Restore" using the current backup, and ALSO perform a "Refresh." That always worked for me. However, with the latest versions, I have not had any more similar problems.

I don't know if this will be helpful, in Orome's case, but I offer this workflow, just in case it hasn't been tried ...
Find all posts by this user
Quote this message in a reply
03-25-2020, 03:34 PM
Post: #8
RE: Why do commands behave inconsistently?
DrD Wrote:  I don't know if this will be helpful, in Orome's case, but I offer this workflow, just in case it hasn't been tried ...

Keep in mind that I'm not only seeing this on the latest hardware running the latest software (2.1.1.14433 / 2020 01 21 on a D), in both the (latest) iOS and macOS apps. The only place I don't see it — and get the expected behavior — is on my old Prime (2013 11 25 / 5447 on an A).

It's possible that at some point I restored to all three of the misbehaving calculators from the same backup and put them all in one of the odd states you mention. (The A would be immune, since it doesn't work with the CK.)

So: I'll try reinstalling my emulators and see where that gets me.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 03:45 PM
Post: #9
RE: Why do commands behave inconsistently?
Orome Wrote:  So: I'll try reinstalling my emulators and see where that gets me.

No luck. A complete iOS reinstall of the HP Prime Pro (which wipes everything associated with the app an fully resets it to "factory" settings) still behave as described above in the OP and videos.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 03:46 PM (This post was last modified: 03-25-2020 03:47 PM by victorvbc.)
Post: #10
RE: Why do commands behave inconsistently?
(03-25-2020 03:26 PM)Orome Wrote:  
victorvbc Wrote:  I can't replicate it either. Maybe you could share a specific set of instructions on how to get this behavior?

See videos:

If you press Enter after selecting Sort, doesn't it sort the list?

That's what I observe in my calculator.
Find all posts by this user
Quote this message in a reply
03-25-2020, 03:50 PM
Post: #11
RE: Why do commands behave inconsistently?
victorvbc Wrote:  If you press Enter after selecting Sort, doesn't it sort the list?

Yes. The question is why selecting [REVERSE] reverses immediately, while [SORT] places SORT() in the command line (requiring a subsequent [ENTER]).
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 05:59 PM
Post: #12
RE: Why do commands behave inconsistently?
(03-25-2020 03:50 PM)Orome Wrote:  
victorvbc Wrote:  If you press Enter after selecting Sort, doesn't it sort the list?

Yes. The question is why selecting [REVERSE] reverses immediately, while [SORT] places SORT() in the command line (requiring a subsequent [ENTER]).

Just a hypothesis: Perhaps it's because REVERSE always and only allows one argument, but SORT allows either one or two arguments (see its Help screen). In RPN, REVERSE can assume that it will always and only take one argument from the stack. But SORT can only know whether to take one or two arguments if you tell it to, by typing SORT(1) or SORT(2), respectively. My hypothesis can be tested by seeing if similar behavior occurs with other single-argument functions and other multiple-argument functions.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 06:54 PM
Post: #13
RE: Why do commands behave inconsistently?
(03-25-2020 05:59 PM)Joe Horn Wrote:  Just a hypothesis: Perhaps it's because REVERSE always and only allows one argument, but SORT allows either one or two arguments (see its Help screen).

Very likely!
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2020, 08:49 PM
Post: #14
RE: Why do commands behave inconsistently?
Quote:I've tried it (in both Algebraic and RPN) on the (latest) iOS and macOS apps, and hardware calculators with the latest (2.1.1.14433 / 2020 01 21 on a D) and some of the earliest (2013 11 25 / 5447 on an A) software.

It behaves as I describe above on all except the very old software, were it works as expected. A recently introduced bug, perhaps?

IF it fails for you in both Algebraic and RPN, then two arguments needed from the stack, (for RPN sort()), doesn't explain the failure in Algebraic entry mode.

#Orome: Does your example also fail in Textbook entry mode?
Find all posts by this user
Quote this message in a reply
03-25-2020, 09:08 PM
Post: #15
RE: Why do commands behave inconsistently?
(03-25-2020 08:49 PM)DrD Wrote:  IF it fails for you in both Algebraic and RPN, then two arguments needed from the stack, (for RPN sort()), doesn't explain the failure in Algebraic entry mode.

#Orome: Does your example also fail in Textbook entry mode?

Sorry my sentence is garbled: the mention of Algebraic relates to it working there on a single argument.

So to be clear: [SORT] evaluates just fine on a single argument in Algebraic mode everywhere I've tried it, but when used in RPN it does not evaluate X (or the command line if occupied) and instead places SORT() on the command line. This is different (without any indication in the UI) from [REVERSE], which evaluates X.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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