HP Forums

Full Version: Programming Question!!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Ok this is what I have so far :
<<" enter function""" input obj->-> a
<<a partfract "y(x)"->tag->str MSGBox>>
now I'm getting what I expect to see from the above what I really want to do is Dtag y(x) into another function (Intergration function) in function to excutes the solution to y(x) by intergrating it . I know it is holding what ever the anwere is, for input (a) in stack. have any ideas?

Well, yes, my idea is that it would be a lot easier to help you if you
were careful to post exactly what you're trying to do. In particular,
pay very close attention to capitalization, spelling, and spacing,
both on your calculator and when posting online. I suggest that you
use a Conn4x "Text" file transfer or "Edit as Text", then copy and
paste it into the post, and (for this forum) enclose it between [pre]
and [/pre] "BBCode" tags. Doesn't:

%%HP: T(3)A(R)F(.);
\<< " enter function" "" INPUT OBJ\-> \-> a
\<< a PARTFRAC "y(x)" \->TAG \->STR MSGBOX
\>>
\>>
seem a lot better than:
Quote:
<<" enter function""" input obj->-> a <<a partfract "y(x)"->tag->str MSGBox>>

Also, note that if you use the copy and paste method, I can just
download your code to my calculator and try it out, rather than trying
to key it in, correcting errors at the same time.

Regards,
James

oka thanks for the idea: my question was is it possible to excutues partfrac and call the solution into intergration in the same program . which the syntax yet has not been written.

Do you mean that you want to use the result from PARTFRAC for something else in the program? Why not just DUP it and leave that copy on the stack for later use? Like this:

%%HP: T(3)A(R)F(.);
\<< " enter function" "" INPUT OBJ\-> \-> a
\<< a PARTFRAC DUP "y(x)" \->TAG \->STR MSGBOX
\>>
\>>
Regards.
James

yes but I inten to implement another built in function integrate to slove the residues from the Partfrac get it

"Harrington" --

An excerpt from James Prange's reply to your first post:

Quote:
Well, yes, my idea is that it would be a lot easier to help you if you were careful to post exactly what you're trying to do. In particular, pay very close attention to capitalization, spelling, and spacing, both on your calculator and when posting online.

Your three posts, verbatim:

Quote:
Ok this is what I have so far : <<" enter function""" input obj->-> a <<a partfract "y(x)"->tag->str MSGBox>> now I'm getting what I expect to see from the above what I really want to do is Dtag y(x) into another function (Intergration function) in function to excutes the solution to y(x) by intergrating it . I know it is holding what ever the anwere is, for input (a) in stack. have any ideas?

oka thanks for the idea: my question was is it possible to excutues partfrac and call the solution into intergration in the same program . which the syntax yet has not been written.

yes but I inten to implement another built in function integrate to slove the residues from the Partfrac get it


I doubt that you're illiterate, but it doesn't seem that you value the time and effort spent by people from whom you ask assistance.

I own the 28C, 48G, and 49G, but freely admit that I don't know RPL well enough to help (nor do I desire to become more proficient). If I were James, though, I wouldn't take the time to provide further counsel. I just don't think you "get it".

-- Karl S.

No, I'm not at all sure that I "get it". By "Partfrac", do you mean
that your program is named "Partfrac"? If you really mean "PARTFRAC",
then write it that way.

Please do make an effort to write standard English. Try to write not
only in a manner that can be understood, but in a manner that can't be
misunderstood.

Doesn't having the result from PARTFRAC on the stack help? You can use
that result as the argument for something else that could follow what you have so
far.

For what you're doing, it seems to me that it may be better to have
the INPUT command force the Algebraic/Program-entry mode and start an
algebraic object, and you may as well have it check the syntax of the
algebraic object too. So how about:

%%HP: T(3)A(R)F(.);
@ Results from BYTES:
@ # B716h
@ 104.5
\<<
" enter function" { "''" 2. ALG V } INPUT
OBJ\->
\-> a
\<<
a PARTFRAC
DUP
"y(x)" \->TAG \->STR MSGBOX
\>>
\>>
Also, there's no need to use a local variable structure for this
program. The above program takes an object from the stack, stores it
to a local variable, and then puts the contents of the local variable
back on the stack and uses it for the argument to PARTFRAC, and
finally removes the local variable when it's done. Why jump through so
many hoops? Maybe try:
%%HP: T(3)A(R)F(.);
@ Results from BYTES:
@ # 78EEh
@ 88.
\<<
" enter function" { "''" 2. ALG V } INPUT
OBJ\->
PARTFRAC
DUP
"y(x)" \->TAG \->STR MSGBOX
\>>
That's smaller and faster, and ends up accomplishing the same
thing.

Regards,
James