Post Reply 
HP Prime CAS programming
08-28-2020, 06:21 PM (This post was last modified: 08-28-2020 10:39 PM by ramon_ea1gth.)
Post: #20
RE: HP Prime CAS programming
I have been very interested in understanding how to call CAS functions from HOME (thinking about including these calls in a HOME program or a custom app). So I found this post extremely interesting, although the original hints have some years. Thus, I have done some tests with firmware version 2.1.14433 (2020 01 21), using variables of string type and in the end the options that work for me are summarised in this small program:
Code:
EXPORT TEST()
BEGIN
LOCAL RES1, RES2, CMD1:="diff(3*x^2+5*x)";

RES1:=CAS.diff("3*x^2+5*x");
RES2:=CAS(EVAL(CMD1));
RETURN RES2;
END;
This program calls the diff() CAS command to differenciate an expression. It works both in CAS as in HOME screens. The result in HOME screen is '3*2*x+5'; in CAS screen, the output is '6*x+5' (it is simplified). It is possible to edit the RETURN line to RETURN RES1, obtaining the same outcome. Notice the application of the EVAL command.

Ramón
Valladolid, Spain
TI-50, Casio fx-180P, HP48GX, HP50g, HP Prime G2
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime CAS programming - Han - 02-19-2015, 08:21 PM
RE: HP Prime CAS programming - salvomic - 02-19-2015, 08:41 PM
RE: HP Prime CAS programming - Han - 02-23-2015, 05:21 PM
RE: HP Prime CAS programming - dg1969 - 02-19-2015, 10:35 PM
RE: HP Prime CAS programming - rprosperi - 02-20-2015, 01:22 PM
RE: HP Prime CAS programming - Han - 02-21-2015, 03:21 AM
RE: HP Prime CAS programming - salvomic - 02-21-2015, 06:21 AM
RE: HP Prime CAS programming - rprosperi - 02-21-2015, 01:54 PM
RE: HP Prime CAS programming - pr0 - 03-30-2015, 04:29 PM
RE: HP Prime CAS programming - Han - 03-30-2015, 05:46 PM
RE: HP Prime CAS programming - Carlos295pz - 04-16-2017, 08:46 AM
RE: HP Prime CAS programming - leprechaun - 01-22-2020, 12:21 PM
RE: HP Prime CAS programming - Joe Horn - 01-22-2020, 01:02 PM
RE: HP Prime CAS programming - Tim Wessman - 01-22-2020, 01:15 PM
RE: HP Prime CAS programming - CyberAngel - 01-25-2020, 10:31 AM
RE: HP Prime CAS programming - compsystems - 01-25-2020, 02:40 PM
RE: HP Prime CAS programming - leprechaun - 01-22-2020, 03:09 PM
RE: HP Prime CAS programming - compsystems - 01-25-2020, 02:58 AM
RE: HP Prime CAS programming - parisse - 01-26-2020, 07:42 AM
RE: HP Prime CAS programming - ramon_ea1gth - 08-28-2020 06:21 PM
RE: HP Prime CAS programming - roadrunner - 08-29-2020, 11:25 AM



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