> The level of what was posted suggests that the user is a relative
> beginner in programming this specific calculator series,
> so why not expand the thread to introduce more information
> about alternate techniques, and a bit of "Socratic method"
> to spur some further thinking?
In fact, I am just at the beginning of learning how to program the
calculator. That "bit of socratic method" in your posts is very nice,
because it puts the reader in the correct direction without giving
away much written information, so everyone can choose whether to
invest time by investigating further on the question or to remain at a
surface level. There is a danger, however, in that 'clues' you give
(e.g. "You did look on the stack, yes?" ), namely that, although they
are highly pedagogic, some people can missunderstand them and see them
as arrogant, BOFH-like behaviour, but that is not the case in general.
> I can attribute the hard work it took me to develop some scripts
> only to the limitations of the ability of my own mind
> to integrate all of the rules and implications
> into a complete understanding of how to use them,
> and I take exactly the same view in regard to the experience,
> practice, and experimentation that it may take
> to master all that's available in the current calculator system.
That is another point of view I agree with, after developing hundreds,
perhaps millions, lines of numeric implementations in Fortran. That is
the only possible attitude that leads to learning and making progress.
Many people struck again the first difficulty and react by start
complaining: 'this is a bug' / 'this should have been explained in the
documentation' / 'this should have been implemented' / 'my roommate
has a TI model X and he surely can do that' and so on. It may me a bad
consequence of the way of thinking we have in modern western
countries: expecting someone else to solve your problems because you
have paid xxx hundred $/€ for the machine.
And regarding the programming issue of the post, I have arrived to the
conclusion that the only way to have the program working in all
circumstances is the "fully algebraic" version, specially if you want
to code a user-defined function that could be called from another
program. Take this simple example to define a function that returns
the argument ^2:
\<< \-> X 'X*X' \>> \>> 'ALGX2' STO @ Algebraic version
\<< DUP * \>> \>> 'RPNX2' STO @ RPN version
\<< \-> X \<< X X * \>> \>> 'ALTRPNX2' STO @Alternative rpn version
Now, although all the three versions work perfectly, there seems to be
no way to code a definite integration (from 0 to t) of this function
using a version other than the algebraic ALGX2. I mean something like:
\<< \-> T '\.S(0,T,ALG(X),X)' \>>
but using RPNX2 or ALTRPNX2 instead of ALGX2. ("Error: Non algebraic
in expression"). Or any other way. Simply try to involve RPNX2 or
ALTRPNX2 in a definite integration by any way. For instance try
manually to get from the stack the value of the integral between 0 and
5; ALGX2 works, but not the other versions:
0
5
'ALG(X)' @here even single quotes work well.
'X'
@and now press RS TAN
Which leads me to the following personal conclusion: "pure RPN style"
UserRPL coding is more prone to error, and that UserRPL compiler/
decompiler does a better work on "algebraic-like" UserRPL code,
although it leads to less efficient implementations. In other words
(and this is an important point on which your opinion can make me save
me a lot of hours in the next future), the rule would be "learn SysRPL
(Kalinowsky book) or restrict yourself to algebraic-style UserRPL (49G
manuals or Parisse docs)". Algebraic-like UserRPL is easy to implement
and safe. SysRPL is powerfull and efficient. But RPN-like UserRPL is a
bad choice, because the winning in efficiency is not worth the
additional efforts and problems, and eventually you will be forced to
use pieces of algebraic code (like is the case posted here). Right?
> The slightly ironic thing is that everything is completely explicit
> and unambiguous in SysRPL, whereas UserRPL is designed to accomplish
> what the manual claims it does, often via a conspiracy between the
> UserRPL compiler and decompiler (the stack displayer)
> to hide the mechanics of how it all really happens.
From that paragraph, I understand that SysRPL is more close to be a
solid, well stablished set of rules for a programming language with no
surprises, where nothing is assumed but has to be explicitely declared
and correctly used or the program will not work. It is important to
understand these facts before investing time on learning a programe
language, if the goal is to acquire the ability for complex
implementations.