HP Forums
Function in program - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Function in program (/thread-3115.html)



Function in program - nakjaen - 02-16-2015 03:47 PM

How i can input a function programming??

ex
EXPORT calculx()
BEGIN
LOCAL x
CAS.cSolve(x^4-1,x);
MSGBOX("The solutionx is " +x);
END;

and say me error D:

I know solve this in Home or CAS, but i need in program xD


RE: Function in program - Han - 02-16-2015 04:21 PM

Two ways:

CAS.command("arg1", "arg2", ..., "argn")

Code:
EXPORT calcul()
CAS.cSolve("x^4-1=0","x");
END;

or create a cas program:

Code:
#cas
calculx():=
BEGIN
cSolve(x^4-1=0,x);
END;
#end



RE: Function in program - nakjaen - 02-16-2015 11:28 PM

Thanks Han, very easy and useful