Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IFTE Command HP 50g

80 views
Skip to first unread message

PremiumBlend

unread,
Dec 26, 2011, 9:34:16 PM12/26/11
to
Hello,

Which of the following programs is more correctly written?
Is it just a matter of style?

\<< 1. FS?
\<< 1. "TRUE"
\>>
\<< 0. "FALSE"
\>> IFTE
\>>

or

\<< 1. FS? { 1. "TRUE"
} { 0. "FALSE" } IFTE
\>>

Regards,

Mark

Uergil

unread,
Dec 27, 2011, 12:33:15 AM12/27/11
to
In article
<db4c37c6-b356-4514...@x19g2000yqf.googlegroups.com>,
Some lists of commands can be executed as if they were programs.

For example
\<< 1. "TRUE" >> EVAL
and
{ 1. "TRUE" } EVAL
will produce the same results, though the second uses considerably less
memory.

Where this is the case, it is a matter of style which one to use.


But for the above program, why not merely
\<< 1. FS? DUP "TRUE" "FALSE" IFTE />>
which will produce the same results?
--
"Ignorance is preferable to error, and he is less
remote from the- truth who believes nothing than
he who believes what is wrong.
Thomas Jefferson

miCchelange

unread,
Dec 27, 2011, 8:17:29 PM12/27/11
to
This article may answer your question!
http://www.hpcalc.org/hp48/docs/programming/nulltags.zip

Nemo

unread,
Dec 28, 2011, 5:47:22 AM12/28/11
to
Very interresting !

> "empty tag" method provides a nice workaround: simply use:
> { ::X RCL } {::Y STO } IFTE

What is the 'logic' of this synt

On Dec 28, 2:17 am, miCchelange <micchelange.8.bald...@gmail.com>
wrote:
Message has been deleted

PremiumBlend

unread,
Jan 5, 2012, 9:45:55 AM1/5/12
to
On Dec 27 2011, 8:17 pm, miCchelange <micchelange.8.bald...@gmail.com>
wrote:
> This article may answer your question!http://www.hpcalc.org/hp48/docs/programming/nulltags.zip- Hide quoted text -
>
> - Show quoted text -

Thanks!

PremiumBlend

unread,
Jan 5, 2012, 9:45:37 AM1/5/12
to
On Dec 27 2011, 12:33 am, Uergil <Uer...@uer.net> wrote:
> In article
> <db4c37c6-b356-4514-b334-f77acdcee...@x19g2000yqf.googlegroups.com>,
>                      Thomas Jefferson- Hide quoted text -
0 new messages