HP Forums

Full Version: Can a program take in an expression unevaluated?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
No. But you can subst once your expression quoted with X=a_free_identifier.
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.
Reference URL's