Re: HP67/97/41 translator
- From: "Raymond Del Tondo" <RDelT@xxxxxx>
- Date: Fri, 25 May 2007 06:43:01 +0200
<gerard.evrard@xxxxxxx> schrieb im Newsbeitrag
news:1180023728.587561.39400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This is NOT correct.The main problem remains GTO ... You can't translate it in easy way...
...one of the thing that I most like in (User)RPL is the lacking of
GOTO, a superflous ...
You like to feel pain ? There is a name for this disease.
I prefer powerful languages like :
RPN (has GOTO),
Pascal (has GOTO),
C++ (has GOTO),
or even BASIC (has GOTO).
Is there a scheme here ?
I decide what I want and the language provides the support.
As for RPL, you can't even break out of a loop. Yuck.
Of course you can 'break out' of a loop, if you really want to.
JHM shows how to do it in UserRPL,
I'll indicate how to do it in SysRPL.
Consider the following code snippet:
DO
:: ..some_code..
..test_condition..
case ExitAtLOOP
..some_other_code..
;
LOOP
If ..test_condition.. returns TRUE,
the ExitAtLOOP word will be evaluated.
ExitAtLOOP is the same as 'ZEROISTOPSTO',
in other words : Loop end has been reached.
This is the clean and supported way to terminate a loop
at any time.
You can also exit a loop using an error condition.
You could even exit a loop using return stack manipulating words,
but that would indicate a code design problem,
not a limitation of the language...
Please refer to RPLMAN.DOC for more info on this topic.
BTW: As mentioned in my earlier post, even SysRPL has a GOTO ;-)
Don't get me wrong:
When programming an HP-41, be it RPN or (in most cases) ML,
you'll need GO jumps.
However, RPL isn't RPN nor BASIC nor Pascal .
It's RPL, a combination of FORTH and LISP.
To get the most out of your HP-48 based machine,
it's best to use the language which is suited best for the platform,
and that's RPL, where you simply don't need GO jumps.
HTH
Raymond
.
- Follow-Ups:
- Re: HP67/97/41 translator
- From: John H Meyers
- Re: HP67/97/41 translator
- References:
- HP67/97/41 translator
- From: Harold A Climer
- Re: HP67/97/41 translator
- From: Massimo Santin \(at GMail\)
- Re: HP67/97/41 translator
- From: Raymond Del Tondo
- Re: HP67/97/41 translator
- From: Massimo Santin \(at GMail\)
- Re: HP67/97/41 translator
- From: gerard . evrard
- HP67/97/41 translator
- Prev by Date: How to Break out of loops
- Next by Date: Re: HP67/97/41 translator
- Previous by thread: How to Break out of loops
- Next by thread: Re: HP67/97/41 translator
- Index(es):
Relevant Pages
|