Post Reply 
HP Prime programmable eq solver
01-06-2014, 08:09 PM
Post: #8
RE: HP Prime programmable eq solver
Hello LarsF,
wow; it works pretty well now. I just modified a couple of things but it is definitely working well.

Here is the procedure for anyone who'd like to use it:

1) Create the following 3 variables:
EQLIB:={{"S=A*B", "S=A*B/2"},{"R=U/I","P=U*I"}}
EQLIBNAME:={{"Surface of a rectangle", "Surface of a triangle"},{"Ohms law","Effect"}}
EQTYPE:={"Area","Electric"}

2) Click on APPS, select the SOLVE, click on SAVE and name it EQLib

3) Edit the program EQLib (App) and copy the following code:

Code:

TYP:=1,EQ;
EXPORT EQLib()
BEGIN
END;

VIEW "Start",START()
BEGIN
  STARTVIEW(6,1);
  STARTVIEW(7,0);
END;

VIEW "Select type",STYPE()
BEGIN
  CHOOSE(TYP,"Select type",EQTYPE);
  STARTVIEW(7,0);
END;

VIEW "Solve EQ Lib",SOLVE()
BEGIN
  LOCAL I;
  CHOOSE(TYP,"Select type",EQTYPE);
  CHOOSE(EQ,"Solve EQ Lib",EQLIBNAME(TYP));
  E1:=EQLIB(TYP,EQ);
  FOR I := 0 TO 9 DO
    UNCHECK(I);
  END;
  CHECK(1);
  STARTVIEW(0,1);
  STARTVIEW(2,1);
END;

VIEW "Add Equation",ADD()
BEGIN
  LOCAL Equation:="", EQname:="";
  CHOOSE(TYP,"Select type",EQTYPE);
  IF INPUT({Equation,EQname},EQTYPE(TYP)+" Insert an EQ",{"EQ: ","EQ Name: "},{"Insert an EQ as string","Insert EQ name as string"}) THEN
    EQLIBNAME(TYP,0):=EQname;
    EQLIB(TYP,0):=Equation;
    STARTVIEW(7,0);
  END;
END;

Now you are ready to use it. Browse for the EQLib APP and launch it.

Enjoy

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


Messages In This Thread
RE: HP Prime programmable eq solver - Giancarlo - 01-06-2014 08:09 PM



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