Post Reply 
Plus42 algebraic expressions update
03-06-2021, 04:38 PM (This post was last modified: 03-06-2021 06:10 PM by Vincent Weber.)
Post: #81
RE: Plus42 algebraic expressions update
(02-25-2021 10:46 PM)rprosperi Wrote:  
(02-25-2021 05:39 PM)Thomas Okken Wrote:  The way I see it, you should be able to write, for example,

QUAD:X^2-3*X+2

Or

LBL "QUAD" MVAR "X" RCL "X" X^2 LASTX 3 * - 2 + END

and use both exactly the same way, calling them using XEQ, or from SOLVE or INTEG.

This beings up an interesting point - if the user has in fact created an RPN program and an equation with the exact same name, which would be used if invoked? It's probably best to not allow one if the other exists, to avoid ambiguity... then again that's also hard as what if you edit a program's name from something non-conflicting to something that does conflict, and other weird scenarios... Hmmm???
Reading again this interesting discussion made me think of something: the 35S handles equations in programs not by pointing to the equation list using a name, but directly: you enter the equation in the program by pressing EQN, this puts the equation in the program as a single step, directly readable when reviewing the program. Quite convenient. A flag indicates whether this step should be treated as a mere comment (just text to be ignored) or as an actual equation to evaluate.

Now I like your solution, Thomas, of calling equations by names, just as programs. It should indeed be kept. But this is not 100% satisfactory, because (i) you don't directly see what equation this is when reviewing the program, you need to go to the equation list for that, and (ii) this equation list will be quickly polluted with small equations that should really kept private within the program they belong...

Could we imagine (probably not now, but after the parser is done) that while in program mode, going to SOLVER then selecting the equation list symbol would allow you to type directly an equation in the program, that will be treated either as a comment or an actual equation, depending on a flag ? When reviewing this step, the equation editor would be launched so that you can scroll/edit...

Thanks and cheers,

Vincent
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 algebraic expressions update - Vincent Weber - 03-06-2021 04:38 PM



User(s) browsing this thread: 1 Guest(s)