Post Reply 
Can a program take in an expression unevaluated?
10-16-2016, 05:54 AM
Post: #1
Can a program take in an expression unevaluated?
Hi guys,

Is there a way to get a CAS program, after it accepts an expression, to not evaluate it?

For example, say this is the program:
Code:
#cas
prg1(expression1):=
BEGIN
  return subst(expression1,'X=x');
END;
#end
Let's say that expression1 is equal to X^2. By the time expression1 is used in my code, the calc would already have evaluated X^2 using whatever value X has.

So I was wondering if there was something like this:
Code:
#cas
prg1(QUOTE(expression1)):=
BEGIN
  return subst(expression1,'X=x');
END;
#end
to tell the calculator not to evaluate the argument. Cos I honestly can't be bothered typing single quotes each time.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Can a program take in an expression unevaluated? - CH3791 - 10-16-2016 05:54 AM



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