Change in CHOOSE behaviour between 8151 and 11586 (Android) (KNOWN)
11-10-2017, 09:42 PM (This post was last modified: 11-10-2017 10:02 PM by StephenG1CMZ.)
Post: #1
 StephenG1CMZ Senior Member Posts: 486 Joined: May 2015
Change in CHOOSE behaviour between 8151 and 11586 (Android) (KNOWN)
Version 0.3 of my Z_LIGHTS program exhibited different behaviour on 8151 and 11586 (both on Android).

In both systems, the behaviour documented in the on-device help is that if the user cancels a selection without choosing a selection, 0 is returned in the CHOOSE variable.

That was the behaviour observed in 8151, where Version 0.3 of Z_LIGHTS worked as expected.
In 11586 however, the previous value in the CHOOSE variable is repeated.

A workaround for this changed behaviour is incorporated in Z_LIGHTS V0.4.

Is this change intended (in which case the on-device help needs clarification)?

Stephen Lewkowicz (G1CMZ)
11-10-2017, 09:56 PM (This post was last modified: 11-10-2017 10:05 PM by StephenG1CMZ.)
Post: #2
 StephenG1CMZ Senior Member Posts: 486 Joined: May 2015
RE: Change in CHOOSE behaviour between 8151 and 11586 (Android)
This change in behaviour has previously been noted here:

I raised it again because I asked about why there was a problem with Z_LIGHTS V0.3, before narrowing down the cause to a CHOOSE, and re-discovering its change in behaviour.

Stephen Lewkowicz (G1CMZ)
11-11-2017, 12:14 AM
Post: #3
 Carlos295pz Member Posts: 137 Joined: Sep 2015
RE: Change in CHOOSE behaviour between 8151 and 11586 (Android) (KNOWN)
Your algorithms are entangled, the general way to use CHOOSE would be something like that for the EXPORT Z_LIGHTS()

Code:
EXPORT Z_LIGHTS()  BEGIN   LOCAL CHS; //,OK;♣   //REPEAT ♣   // OK:=CHOOSE(CHS,CRID,CHOICES); ♣   WHILE CHOOSE(CHS,CRID,CHOICES) DO    //IF OK THEN //WORKAROUND ♣     CASE        IF CHS==1 THEN HELP   END      IF CHS==2 THEN INFO   END      IF CHS==3 THEN LIGHTSTEADY END      IF CHS==4 THEN LIGHTCOLR   END      IF CHS==5 THEN LIGHTBLINK  END      IF CHS==6 THEN LIGHT_SOS   END      IF CHS==7 THEN ASK_WPM     END      //DEFAULT ♣     END;//CASE    //END;//IF ♣   //UNTIL OK==0;//WORKAROUND ♣   END; //WHILE  END;

Implement it like this in the other selection loops

Viga C | TD | FB
11-13-2017, 02:53 PM
Post: #4
 Tim Wessman Senior Member Posts: 1,694 Joined: Dec 2013
RE: Change in CHOOSE behaviour between 8151 and 11586 (Android) (KNOWN)
Hello,

The behavior as implemented is correct and has now been in force longer then the "original" I believe. The less disruptive thing to do is just tweak the help to make it a bit more clear.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
 « Next Oldest | Next Newest »

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