HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT
|
04-07-2021, 03:02 AM
Post: #4
|
|||
|
|||
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT
(04-06-2021 11:44 PM)Gil Wrote: The correct way is to use {} in that case. That depends on what you mean by "correct way." The "correct way" according to the manual would have you use << blah >> for a program that you want to evaluate or ' blah ' for a formula you want to evaluate. When a program that is already running evaluates an object delimited by << >> (or by ' ', or { }), it will push the contents with those delimiters onto the stack (including the delimiters). This is necessary if you wish for IFT to evaluate a sequence of commands rather than just branch to an atomic object. Since you wish for IFT's evaluation to push a formula to the stack, it needs to be done within a program. Hence << 'formula-to-push' >> would be the "correct way" because it is not possible to create an algebraic object whose evaluation pushes another algebraic object in User-RPL. A program is necessary for such a goal, and typically programs are delimited by << and >>. The allowance for the use of { } in place of << >> has to do with how User-RPL was designed to evaluate composite objects. For composite objects, it simply just treats the contents as if it were a program during evaluation. Incidentally, algebraic objects are actually stored in the exact same manner as lists and programs (they are displayed differently, though) because they too are composite objects. The evaluation simply evaluates each object in the order that they appear (internally) in the list (left-to-right). So in theory (and in practices, as you have shown) you could simply create your programs (that you wish to push to the stack) using lists. The advanced user's manual says that the last argument of IFT is any object. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Gil - 03-27-2021, 07:17 PM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Han - 03-28-2021, 04:39 AM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Jonathan Busby - 04-11-2021, 10:28 PM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Gil - 04-06-2021, 11:44 PM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Han - 04-07-2021 03:02 AM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Jonathan Busby - 04-11-2021, 10:32 PM
RE: HP49-50G : test IF THEN 'Instruction1' END ≠ test 'Instruction1' IFT - Gil - 04-07-2021, 10:26 AM
|
User(s) browsing this thread: 2 Guest(s)