![]() |
Suggestion to extend tests for Free42 - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Suggestion to extend tests for Free42 (/thread-65680.html) |
Suggestion to extend tests for Free42 - Namir - 11-11-2004 Hi Thomas, I have a suggestion regarding HP42s tests (like X=0?, x>y? and so on). How about allowing the test to execute a subsequent "BLOCK" or statement that appears after the test, if the test is true, or skip that block if teh test is flase. The block is enclose by { and }. The open brace appears right after the test. Here is an example:
2 If the test X>Y? is true then the processor executes the block of commands (RCL 00 and STO* 01 that are in the block that appears after the test. If the tested condition is false the processor skips the block altogether. Of course a block MAY contain other tests with their own blocks, so there should be a counter to detect the appropriate }.
Namir
Re: Suggestion to extend tests for Free42 - Thomas Okken - 11-12-2004 I'm not a big fan of that type of feature, I must admit. It seems like syntactic sugar that doesn't make anything easier that wasn't pretty easy to begin with. |