Showing results for 
Search instead for 
Did you mean: 
New member
1 0 0 0
Message 1 of 2
Flag Post


HP Prime Cas.Mode in Program functions

HP Recommended

Hello community, I'm learning some of HP Prime programming language, but I'm not really associated at this, I would like to know basic structure using Matrix and CAS functions (both in programming mode). I''ll really appreciate some examples with programs using both of this. Tell if I'm unclear. 

Tags (1)
Level 6
Level 6
252 251 42 77
Message 2 of 2
Flag Post
HP Recommended



This is quite a whide domain/field here!


First, you need to know that they are 2 programming languages in HP Prime. They are relatively similar, but not exactly, which can be at the same time a plus (only 1 thing to learn) and a minus (subtle differences are not very visible and can cause problems)...


Anyhow, to create a new CAS program, go to the program catalog (shift program), and click on New, enter the program name and check the CAS check box.


This will create a basic, empty CAS program along the lines of:




  return 0;




TEST is the name of the function (you can have as many as you want in your cas program)

in the parenthesis, you find the arguements. In this case none, but add which ever you want/need as in:

TEST(param1, param2, param3)


between the BEGIN and END, you find the core of your program. There you can assign values to variables (using the variable_name:= expression_that_returns_a_value;  syntax. For exampl: a:= 1+2;)


You will find a lot (but not all), of the matrix commands in the Toolbox key/ math/Matrix menu.

you can access (read and write) an element of a matrix by doing var[row,col]


The Template menu item (in the main program editor window) should show you what the basic programming constructs look like (looks and tests).


This should get you started. Once you have experienced with this, you should be able to come back to this forum and ask more specific questions.




I am an HP Employee
0 Kudos
Tags (1)
Warning Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation