Post Reply 
How to make cas-mode program visible when choosing from program library
07-23-2019, 03:49 AM
Post: #1
How to make cas-mode program visible when choosing from program library
I'm creating a program in cas mode with (when creating a program, I checked on cas check box). Then I work in cas mode. When accessing the program, I press program library button (which is mem key) > User

ิI can't find the program I wrote. I found only the program I wrote which are not in cas mode.

How can I make my program in cas mode visible from User list.

Note : I can find it in Catlg.
Find all posts by this user
Quote this message in a reply
07-23-2019, 05:53 AM
Post: #2
RE: How to make cas-mode program visible when choosing from program library
Hello,

The way CAS works makes it difficult to find programs... in a list...
Furthermore, most programs have sub functions, and in the CAS, there is no way to distinguish main program entry from sub functions...

The best solution (should your program allow it), would be to write a PPL "header" for your cas program and set that "header" or "calling function" as exported.

cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
07-26-2019, 04:22 AM
Post: #3
RE: How to make cas-mode program visible when choosing from program library
Thank you, Cyrille for your help.

I'm quite new to HP Prime programming. Not get what you try to explain.

Let's say, my program written in cas mode is like this:

#cas
Test123(AB,CD):=
BEGIN
RETURN AB*CD;
END;
#end


what should I do (or added in the code) to make the program visible in the list
Find all posts by this user
Quote this message in a reply
07-26-2019, 04:42 AM
Post: #4
RE: How to make cas-mode program visible when choosing from program library
It is visible, under "VARS->Cas->Program"

The problem is that cas "programs" are actually variables containing an object that happens to contain something that executes. You can delete it, store something else in it, etc. It really is just a variable.

There is no difference unfortunately between f(x):=x^2 and something much more complicated. Would you want f(x)=x^2 to appear in your "programs" area?

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
07-26-2019, 06:01 AM (This post was last modified: 07-26-2019 06:02 AM by Han.)
Post: #5
RE: How to make cas-mode program visible when choosing from program library
Just create a wrapper as suggested by Cyrille. Create your CAS program with using whatever program name you want and just add an 'h' in front for a HOME program that calls your CAS program. Example:

Code:
#cas
BEGIN CASPRG():=
  return(2-1);
END;
#end;


EXPORT hCASPRG()
BEGIN
  CASPRG();
END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
07-26-2019, 05:53 PM
Post: #6
RE: How to make cas-mode program visible when choosing from program library
I like setting up my own pop-up program menu, assigned to a user key. Here's an example from Eddie's blog that does exactly that:

http://edspi31415.blogspot.com/2017/11/h...st-of.html

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




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