Post Reply 
Variable use between CAS and Home.
08-08-2017, 11:11 PM
Post: #10
RE: Variable use between CAS and Home.
(08-08-2017 04:19 PM)Rudi Wrote:  I have written a user defined function. It change little x to great X.
------------------------------------------------------
I have defined the Name of the function in the follow:
CHANGE x to X
CH x 2 X
------------------------------------------------------
#cas
CHx2X(cmd):=
BEGIN
return subst(cmd,x = ('X'));
END;
#end

Examples (In Mode CAS):


1. CHx2X(2*x+5*x²-5) ==> 2*X+5*X²-5

2. F1:= CHx2X(2*x+5*x²-5) ==> X-> (2*X+5*X²-5)

This looks very nice and may be a good solution to a problem I always encounter.

Any idea how to add an EXPORT statement so the program will present the user with ...

CHx2X()

on the input?

I tried a few options and couldn't get it to work. I'm a total beginner on programming the Prime.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Variable use between CAS and Home. - Skyblues - 08-08-2017 11:11 PM



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