A few questions 42S Global Labels - 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: A few questions 42S Global Labels (/thread-150624.html) |
A few questions 42S Global Labels - Egan Ford - 05-03-2009 First, are there "hidden" global labels? I.e. a way to create a global label that can be called from a program, but does not appear with XEQ? Second, is there a way to organize global labels in the XEQ list? The challenge I face with a program I am writing is that my program front-ends the solver and PGMSLV requires a global label. Now I have many global labels that have limited use outside of this program.
Thanks.
Re: A few questions 42S Global Labels - Thomas Okken - 05-03-2009 Quote: No.
Quote: No, the global labels appear in the catalog in the order in which they appear in program memory, from last to first. There is no control over this, no grouping or reordering like on the RPL machines.
Quote: That's life on the HP-42S... There are ways to ameliorate the problem, though. You can use one global label for multiple functions; if you combine all the functions you want to be able to solve into one program, using a variable to select between them, then you can use one single global label as the entry point for all of them, thus reducing global label clutter at the expense of some obfuscation in your program:
LBL "FCNS" Using only one global label has the disadvantage that you're stuck with the same set of MVARs for all the sub-functions, but since you were talking about running the solver under program control, I'm guessing that's not a problem.
- Thomas
Re: A few questions 42S Global Labels - Egan Ford - 05-04-2009 Thanks. Great idea. Worked out perfect. Since I use VARMENU in the calling program there is no need for MVAR in the Solver global.
Re: A few questions 42S Global Labels - Karl Schneider - 05-04-2009 Thomas -- Good workaround. It's very similar in concept to my solution when someone asked how to be able to select which variable to SOLVE or INTEGrate using a pre-Pioneer model. An excerpt from my article #556:
f(x, y, z) = 2*x - ln y + 1/z
-- KS Edited: 4 May 2009, 10:47 p.m.
Re: A few questions 42S Global Labels - Egan Ford - 05-04-2009 Karl,
Great article. Thanks.
|