Post Reply 
UserRPL HP 50G
07-01-2014, 08:02 PM
Post: #12
RE: UserRPL HP 50G
(07-01-2014 05:25 PM)Mikkiz Wrote:  i've changed the code abit the most ? are gone, sadly i dont have the code on my pc here due to a pc crash, so i had to remake it again. I've also attached a picture which displays what i want to calculate, if there are some questions.

I'm going to guess that you originally used a word processing application to type in the code, because it appears that most of the characters that didn't translate well were either a single quote (') or dash/minus (-). Those characters are frequently "auto-substituted" by word processors to be other characters, which might explain why they didn't make it to your final code properly.

With that in mind, I made an attempt to correct a few obvious syntactical errors in your code and came up with the following:
Code:
\<<

@ Input box, T = Sum

"TITLE"
{ {"xf" "Lower Limit"}
{"xd" "Upper Limit"}
{"v" "Reflux Ratio"}
{"a" "Segregation Factor"}
{"n" "Partitions"} }
2 { } { } INFORM
IF 0 == THEN KILL END
OBJ\-> DROP

@ Calculate h and store 0 in T, s1, and s2

4 PICK 6 PICK - 2 PICK / @ that ? confuses me abit
0 DUP DUP

@ Store local variables

\-> xf xd v a n h T s1 s2
\<<

@ Subroutines

\<< v xi * xd + v 1 + / \>> 'y' STO
\<< a xi * 1 xi 1 a - * + / \>> 'ys' STO
\<< ys \->NUM y \->NUM - INV \>> 'F' STO @ Do i have to change ? with F or with 1

@ Endpoints

xf 'xi' STO F 'T' STO+
xd 'xi' STO F 'T' STO+

@ Inner terms of the Simpson Rule

0 n 2 / 1 - FOR K
2 K * 1 + h * xf + 'xi' STO
F 's1' STO+ NEXT
0 n 2 / 1 - FOR K
2 K * h * xf + 'xi' STO
F 's2' STO+ NEXT

@ Calculating the integral

s1 4 * 'T' STO+
s2 2 * 'T' STO+
T h 3 / *

@ Finalizing

v DUP 1 + / * 'T' STO

@ Display T and purge outstanding variables

T 'Result' \->TAG { xi, F, ys, y} PURGE \>>
\>>

This should at least get you to the point of being able to run the program and start the debugging process. I made no logical changes at all, but the following items were changed to allow it to meet syntax requirements:

1) All instances of "->" were converted to "\->"
2) All instances of "«" were converted to "\<<"
3) All instances of "»" were converted to "\>>"
4) "-> NUM" was converted to "\->NUM" (and you may actually need EVAL in those positions, so you may want to check on that)
5) I added a title string ("TITLE") which INFORM needs as a parameter.
6) I changed from double spacing to single spacing
7) I changed the ?s in these lines to dashes:
Code:
4 PICK 6 PICK ? 2 PICK /
0 n 2 / 1 ? FOR K
0 n 2 / 1 ? FOR K

(07-01-2014 05:25 PM)Mikkiz Wrote:  any1 here programs in Algebraic mode? (i cant find good tutorials >.<)

Programming documentation for HP-48/49/50 systems using Algebraic mode is practically non-existent. You'll find the opposite is true for using the 50g in RPN mode. I doubt there's anyone that frequents this forum that uses Algebraic mode on their HP calculators for normal work, so this may not be the best place to seek that kind of assistance.

(07-01-2014 05:25 PM)Mikkiz Wrote:  are there better programs than HpUserEdit?

My only exposure to HPUserEdit is seeing a youtube demonstration of it, and I'm afraid I couldn't understand the dialogue of the speaker because I'm not fluent enough in Spanish to understand what he was saying. That said, the demo he provided showed some very nice features for User RPL editing with that program.

I do most of my 50g programming using Debug4x on a Windows-based laptop. It does provide some nice functionality for User RPL programming, but its strength is really System RPL and Saturn Assembly coding. Just based on the demo of HPUserEdit that I saw, I would think that Debug4x would feel like a step down from that environment. You may want to take a look at it, though, if you're wanting to investigate other options for PC-based 50g programming tools.

Hope this helps!
- David
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
UserRPL HP 50G - Mikkiz - 06-29-2014, 07:01 PM
RE: UserRPL HP 50G - DavidM - 06-29-2014, 09:20 PM
RE: UserRPL HP 50G - Mikkiz - 06-30-2014, 04:00 PM
RE: UserRPL HP 50G - HP67 - 06-30-2014, 04:23 PM
RE: UserRPL HP 50G - DavidM - 06-30-2014, 05:55 PM
RE: UserRPL HP 50G - HP67 - 06-30-2014, 06:31 PM
RE: UserRPL HP 50G - DavidM - 06-30-2014, 06:59 PM
RE: UserRPL HP 50G - HP67 - 07-01-2014, 06:27 AM
RE: UserRPL HP 50G - CosmicTruth - 07-01-2014, 12:26 AM
RE: UserRPL HP 50G - Mikkiz - 07-01-2014, 05:25 PM
RE: UserRPL HP 50G - HP67 - 07-01-2014, 05:35 PM
RE: UserRPL HP 50G - DavidM - 07-01-2014 08:02 PM
RE: UserRPL HP 50G - Mikkiz - 07-02-2014, 07:44 PM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 06:29 AM
RE: UserRPL HP 50G - Joe Horn - 07-03-2014, 08:13 AM
RE: UserRPL HP 50G - Voldemar - 07-03-2014, 11:07 AM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 11:18 AM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 11:15 AM
RE: UserRPL HP 50G - CosmicTruth - 07-04-2014, 12:32 AM
RE: UserRPL HP 50G - Brad Barton - 07-03-2014, 01:57 AM



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