HP Forums
IFT-structure - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: Articles Forum (/forum-14.html)
+--- Thread: IFT-structure (/thread-16132.html)



IFT-structure - Gil - 01-05-2021 10:19 AM

About my previus post to which I couldn't add a reply, here is a logical explanation.

IFT looks for the last but one element before itself (true/1 or not true/0) to execute the instruction just before itself.

But as DROP-command has cleared, by definition, the last argument in the stack (at level 1), a problem arises logically, so that John's Keith's suggestion is not valid in that case.

Here I copied my original thread:

About the use of IFT
suggested by John Keith

Try and run that program:
«1000 6 5 > 1 == DROP IFT
»

Well, it seems that it does not work with the
"object" command DROP.

But, of course
«1000 6 5 > 1 == IF THEN DROP END
»
works fine with DROP
and normal IF... THEN... End.

IFT will work fine, however, with "positive"
instead of command DROP
«1000 6 5 > 1 == "POSITIVE" IFT
»

Regards,
Gil