HP Forums
(42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 (/thread-12045.html)



(42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Gerald H - 12-31-2018 06:35 AM

For reals input

A
B

the programme returns for

A<B
-1

A=B
0

A>B
1

The programme poses no problems on the real HP 42S, however on Free42 the programme cannot be entered, or at any rate I haven't managed it, as after entering the "3" in the label I can't enter any alpha characters.

Any hints how to do this?

Code:
00 { 11-Byte Prgm }
01▸LBL "3WCP"
02 -
03 X≠0?
04 SIGN
05 .END.



RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Werner - 12-31-2018 07:32 AM

2nd
LBL
WXYZ
3
W
etc.

The key to entering an alpha label that starts with a number, is to select alpha mode first.
Select any of the six preselection keys first, then the '3' will be recognized as an alpha character instead of a number.

Cheers, Werner


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Gerald H - 12-31-2018 07:41 AM

Thank you, Werner, that does the trick.

Still a difference in entering labels between Free42 & HP 42S.


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - SammysHP - 12-31-2018 07:46 AM

This is indeed a difference between the HP 42S and free42. With the real calculator, after you have entered a number and the prompt changes to LBL 3_, you can resume alpha input by pressing shift+alpha (and the prompt changes back to LBL "3_).


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Werner - 12-31-2018 09:26 AM

(12-31-2018 07:46 AM)SammysHP Wrote:  This is indeed a difference between the HP 42S and free42. With the real calculator, after you have entered a number and the prompt changes to LBL 3_, you can resume alpha input by pressing shift+alpha (and the prompt changes back to LBL "3_).

Never too old to learn, I didn't know that!
Cheers, Werner


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Thomas Okken - 01-02-2019 11:56 PM

(12-31-2018 09:26 AM)Werner Wrote:  
(12-31-2018 07:46 AM)SammysHP Wrote:  This is indeed a difference between the HP 42S and free42. With the real calculator, after you have entered a number and the prompt changes to LBL 3_, you can resume alpha input by pressing shift+alpha (and the prompt changes back to LBL "3_).

Never too old to learn, I didn't know that!
Cheers, Werner

Me, neither! I think the manual mentions entering one of the ALPHA sub-menus if you want to enter an alpha label that starts with a digit, but I'd never heard of (or thought of) this trick before.

Seems pretty simple to fix. I'll do it in the next release.

Thanks to ijabbott for pointing this out to me -- I don't follow this subforum, I usually only read General, Not Quite, and Not Remotely.


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - rprosperi - 01-03-2019 01:24 AM

(01-02-2019 11:56 PM)Thomas Okken Wrote:  Seems pretty simple to fix. I'll do it in the next release.

@Thomas - Will this change in Free42 be inherited by DM42, or will the DM42's enhanced Alpha features need to handle this in the DM42 app code? In other words, should I post a link to this thread on the SM Forum to give David a head's up?


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Thomas Okken - 01-03-2019 02:15 AM

(01-03-2019 01:24 AM)rprosperi Wrote:  
(01-02-2019 11:56 PM)Thomas Okken Wrote:  Seems pretty simple to fix. I'll do it in the next release.

@Thomas - Will this change in Free42 be inherited by DM42, or will the DM42's enhanced Alpha features need to handle this in the DM42 app code? In other words, should I post a link to this thread on the SM Forum to give David a head's up?

I'm sure they can figure it out when they merge my update with their code.


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - rprosperi - 01-03-2019 03:43 PM

(01-03-2019 02:15 AM)Thomas Okken Wrote:  
(01-03-2019 01:24 AM)rprosperi Wrote:  @Thomas - Will this change in Free42 be inherited by DM42, or will the DM42's enhanced Alpha features need to handle this in the DM42 app code? In other words, should I post a link to this thread on the SM Forum to give David a head's up?

I'm sure they can figure it out when they merge my update with their code.

OK, thanks.


RE: (42S) Three-Way Comparison, <=>, compare for Reals & a Problem on Free42 - Thomas Okken - 01-03-2019 06:44 PM

(01-03-2019 03:43 PM)rprosperi Wrote:  
(01-03-2019 02:15 AM)Thomas Okken Wrote:  I'm sure they can figure it out when they merge my update with their code.

OK, thanks.

Confirmed; the change is about eight new lines of code, all in one place, in the command-entry handler. Unless the DM42 extended-alpha code has tentacles all over the place, this change shouldn't affect it at all.

The greater open question is when I'm going to release 2.0.22. If I keep not having time to work on the iOS UI rewrite, I may end up deciding not to wait for that and release 2.0.22 for the other platforms first. I prefer releasing for all five platforms at the same time but sometimes things don't work out that way...