Logic Problem - Hewlett Packard

This is a discussion on Logic Problem - Hewlett Packard ; I am having problems with User Flag Commands. For instance, the first line of a program has: IF 1FS? THEN 'R12' RCL ... END This works fine. But if I have: IF 1FS? AND 5FS? THEN 'R12' ... END and ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Logic Problem

  1. Logic Problem

    I am having problems with User Flag Commands. For instance, the first
    line of a program has:

    IF 1FS? THEN 'R12' RCL ... END

    This works fine. But if I have:

    IF 1FS? AND 5FS? THEN 'R12' ... END

    and try to run the program I get: AND Error: Too Few Arguments

    But the HP50g accepts this line when I enter it into a program without
    a syntax error message but it will not run it without this error
    message and subsequent program stop. How do I set this up so that the
    program will run? I have tried many things such as: IF '1FS? AND
    5FS?' THEN ... END but nothing has worked so far.

    Also, I need: IF '1FS? AND (5FS? OR 6FS?...)' THEN ... END Again,
    how do I set this up.

    One of the little rubber feet has fallen out of my HP 50g and been
    lost. (I have not had the calculator two months!) HP evidently does
    NOT provide this little replacement part for purchase!

    Also, I had to put in a fifth set of new batteries today. What a
    battery killer this machine is.

    Charles A. Huffer


  2. Re: Logic Problem

    On 4 Apr, 11:31, "Charles" wrote:
    > I am having problems with User Flag Commands. For instance, the first
    > line of a program has:
    >
    > IF 1FS? THEN 'R12' RCL ... END
    >
    > This works fine. But if I have:
    >
    > IF 1FS? AND 5FS? THEN 'R12' ... END
    >
    > and try to run the program I get: AND Error: Too Few Arguments
    >
    > But the HP50g accepts this line when I enter it into a program without
    > a syntax error message but it will not run it without this error
    > message and subsequent program stop. How do I set this up so that the
    > program will run? I have tried many things such as: IF '1FS? AND
    > 5FS?' THEN ... END but nothing has worked so far.
    >
    > Also, I need: IF '1FS? AND (5FS? OR 6FS?...)' THEN ... END Again,
    > how do I set this up.
    >
    > One of the little rubber feet has fallen out of my HP 50g and been
    > lost. (I have not had the calculator two months!) HP evidently does
    > NOT provide this little replacement part for purchase!
    >
    > Also, I had to put in a fifth set of new batteries today. What a
    > battery killer this machine is.
    >
    > Charles A. Huffer


    Hi Charles.
    I think it's related to the RPL feature - I explain a little better:

    >>> IF 1FS? AND 5FS? THEN 'R12' ... END


    >>> and try to run the program I get: AND Error: Too Few Arguments


    You get too few arguments because AND expects *two* arguments, so
    writing:

    IF 1FS? 5FS? AND THEN 'R12' ... END

    *should* work....
    Hope this helps.
    Best regards.
    Giancarlo


  3. Re: Logic Problem

    Charles,

    For your first question, do the following, remember it's RPN
    (RPL, whatever).

    IF 1 FS? 5 FS? AND THEN 'R12' RCL ... END

    For your second question, do this

    IF 5 FS? 6 FS? OR 1 FS? AND THEN ... END

    Can't help you with the lost rubber feet. Sorry.

    John

    On 04/04/2007 5:31 AM, Charles wrote:

    > I am having problems with User Flag Commands. For instance, the first
    > line of a program has:
    >
    > IF 1FS? THEN 'R12' RCL ... END
    >
    > This works fine. But if I have:
    >
    > IF 1FS? AND 5FS? THEN 'R12' ... END
    >
    > and try to run the program I get: AND Error: Too Few Arguments
    >
    > But the HP50g accepts this line when I enter it into a program without
    > a syntax error message but it will not run it without this error
    > message and subsequent program stop. How do I set this up so that the
    > program will run? I have tried many things such as: IF '1FS? AND
    > 5FS?' THEN ... END but nothing has worked so far.
    >
    > Also, I need: IF '1FS? AND (5FS? OR 6FS?...)' THEN ... END Again,
    > how do I set this up.
    >
    > One of the little rubber feet has fallen out of my HP 50g and been
    > lost. (I have not had the calculator two months!) HP evidently does
    > NOT provide this little replacement part for purchase!
    >
    > Also, I had to put in a fifth set of new batteries today. What a
    > battery killer this machine is.
    >
    > Charles A. Huffer


+ Reply to Thread