Post Reply 
HP Prime CAS programming
02-23-2015, 05:21 PM
Post: #8
RE: HP Prime CAS programming
(02-19-2015 08:41 PM)salvomic Wrote:  Thank you, Han,
I'm bookmarking this guide, very interesting for me.

Please, explain also something about how pass arguments, i.e how pass an optional argument...

Have a nice day!

***
EDIT:
please, Han, advise, if possible, how to make a Help for a customized program.
I would like to help about the list of parameters when the program start (or pressing Help key, but I don't know if it's possible)...

One way is to mimic commands from *nix environments. Create a CAS program that acts as a wrapper for the program. The CAS program should handle dynamic input so that if no input is given, it spits out the help. Otherwise, the wrapper sends it to the actual program.

Code:

#cas
wrapper(arg):=
BEGIN
  local s;
  s:=SIZE(arg);
  IF s==0 THEN RETURN("Usage: command(matrix, real, list)"); END;
  IF s==3 THEN DOMYPROG(arg(1),arg(2),arg(3)); END;
  // etc.
END;
#end

Graph 3D | QPI | SolveSys
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 - roadrunner - 08-29-2020, 11:25 AM



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