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
10-16-2016, 07:15 AM
Post: #2
RE: Can a program take in an expression unevaluated?
No. But you can subst once your expression quoted with X=a_free_identifier.
Find all posts by this user
Quote this message in a reply
10-16-2016, 07:46 AM
Post: #3
RE: Can a program take in an expression unevaluated?
Ok, but would there be another way to convert lowercase to Uppercase and vice versa? Because that would help heaps with switching between modes i.e. going from CAS to Function Symbolic View or Home etc.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: