The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[HP PPL] Concatenation inside CAS(..) command does not work
08-04-2024, 03:44 PM
Post: #1
[HP PPL] Concatenation inside CAS(..) command does not work
Hello, new Prime user here. I have the following program:

Code:

  local d, f, expression;
  if input({{f,[2]}}, "Derivate", "f(x)=") 
  then       
    expression:="diff(x^2,x)";
    d:= CAS(expression);
    return d; 
  end;

This program doesn´t work. It returns the string "diff(x^2,x")" instead of the actual differentiation result.

But if replace the above CAS call with:

Code:

    d:= CAS("diff(x^2,x)");

Then I get the proper diff output. Why?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[HP PPL] Concatenation inside CAS(..) command does not work - Le0ssa - 08-04-2024 03:44 PM



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