Post Reply 
[Request] Control of algebraic expressions CAS
06-10-2016, 07:34 PM (This post was last modified: 06-10-2016 07:35 PM by compsystems.)
Post: #22
RE: [Request] Control of algebraic expressions CAS
In its documentation, a second argument for EVAL is not shown

https://www-fourier.ujf-grenoble.fr/~par....html#2624

in line # 11, the PRINT command not evaluated after the string, why is this happening?

11: print( "with '': " + quote(xpr) ); wait; // returns xpr ??,

Code:

1: #cas
2: p1(xpr):=
3:     BEGIN
4:         local getOperator, part1, part2, expr1;
5:         getOperator:=0;
6:         part1:=1;
7:         part2:=2;
8:         print( "original input: " + xpr ); wait; // retunrs x^3/x^2, PRINT recall xpr ID, OK
9:         print( ": " + 3*xpr*6 ); wait; // returns 3*x^3/x^2*6, PRINT also recall xpr ID, OK
10:         print( ": " + collect(3*xpr*6) ); wait; // returns 18*x, OK
11:         print( "with '': " + quote(xpr) ); wait; // returns xpr ??, why not call QUOTE to xpr ID?
12:         print( "with ' ' and eval external: " + eval(quote(xpr)) ); wait; // returns x^3/x^2 OK
13:         print( "with ' ' and eval internal:'': " + quote(eval(xpr)) ); wait; // returns eval(xpr) ??
14:     END;
15: #end
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Request] Control of algebraic expressions CAS - compsystems - 06-10-2016 07:34 PM



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