HP 50g simple programming - Hewlett Packard

This is a discussion on HP 50g simple programming - Hewlett Packard ; CHOOSE returns 1 when a choice has been taken 9 for cancel surround it by IF or use a loop to force a selection wrote in message news:bce72cb4-07b0-41a2-81da-aaae3e5005b1@k36g2000pri.googlegroups.com... On Nov 3, 1:39 pm, "John H Meyers" wrote: > > Import/export ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 22 of 22

Thread: HP 50g simple programming

  1. Re: HP 50g simple programming [backslashes]

    CHOOSE returns 1 when a choice has been taken 9 for cancel
    surround it by IF or use a loop to force a selection

    wrote in message
    news:bce72cb4-07b0-41a2-81da-aaae3e5005b1@k36g2000pri.googlegroups.com...
    On Nov 3, 1:39 pm, "John H Meyers" wrote:
    > > Import/export programs for emulators such as Emu48:
    > >http://groups.google.com/group/comp....7ed90b3cf11c42

    >
    > The above also imports and exports
    > between calculators and plain text files on SD cards
    > (which in turn may be stored or edited using computers).
    >
    > [r->] [OFF]



    On 50g user's guide page 679:

    "Units coefficient" { { "S.I. units" 1}
    { "E.S. units" 1.486} } 1 CHOOSE >> ---> save to 'CHP1'

    Running this program, system will highlight choose box 'S.I
    Units' (1st choice)

    If I select 'S.I. Units' result is s2 1
    S1 1

    If I select 'E.S. Units' result is s2 1.486
    S1 1
    I made a small change in this program,

    "Units coefficient" { { "S.I. units" 1}
    { "E.S. units" 1.486} } 2 CHOOSE >> ---> save to 'CHP1'

    Running this program, system will highlight choose box 'E.S
    Units' (2nd choice)

    If I select 'S.I. Units' result is s2 1
    S1 1

    If I select 'E.S. Units' result is s2 1.486
    S1 1

    It seems to me : the corresponding coefficient of the system unit
    selected is put on stack 2 (s2)
    But why in the two examples, the stack 1 (s1) always show number '1' ,
    this confuse me..???



  2. Re: HP 50g simple programming [backslashes]

    On Tue, 04 Nov 2008 02:13:55 -0600

    [about what's returned to stack by CHOOSE]

    All commands (with their required inputs and results)
    are fully explained in the Advanced Users Guide (AUR).

    If CHOOSE is canceled, it returns only: 0

    If you select a value and OK (or ENTER),
    then it returns two things: value 1

    The purpose of 1/0 is as a TRUE/FALSE test using IF...
    (to act according to whether CHOOSE was canceled or not)

    [r->] [OFF]

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2