==== IFT ==== ---- ---- Execute objects on the stack conditionally ---- ^ __Input Stack__ ^^ ^ __Output Stack__ ^ | **1** | **O** | **→** | **[O]XEQ** | | **0** | **O** | **→** | | | //Level 2// | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |**Type**| [[manual:chapter5:basics#commands|Command]] || |**Parallel list processing**| [[manual:chapter5:listproc#group-2commands-that-must-use-dolist-to-parallel-process|Group 2]] || |**Affected by flags**| None || ---- The ''IFT'' command tests the object on level 2 of the stack: if the test returns ''1'' then it ''[[manual:chapter6:operators:cmd_ovr_xeq|XEQ]]''tes the object on level 1, otherwise both the object and the result of the test are dropped. ---- This command is fully compatible with userRPL. ---- 3: "This is a string" 2: { 'X' 'Y' 'Z' } 1: 1_m …………………………………………………………………………………… IFT will result in 2: "This is a string" 1: 1_m …………………………………………………………………………………… ---- 3: "This is a string" 2: 0 1: 1_m …………………………………………………………………………………… IFT will result in 1: "This is a string" …………………………………………………………………………………… ---- {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}