Post Reply 
[Request] Control of algebraic expressions CAS
06-09-2016, 06:32 PM
Post: #17
RE: [Request] Control of algebraic expressions CAS
What am I doing wrong so that the following code does not work?

Code:
#cas
prg_cas(xpr):=
    BEGIN
        local getOperator, part1, part2, expr1;
        getOperator:=0;
        part1:=1;
        part2:=2;
        print("original input: " + xpr); wait; // x^3/x^2 // OK
        print("with '': " + quote(xpr)); wait;
        expr1:=quote(xpr);
        print("with '' and stored in ID: " + expr1); wait;
        
        print("operator: "+ part(quote(xpr),getOperator) ); wait;
        print("operator: "+ part(quote(expr1),0) ); wait;
        print("part1: "+ part(quote(expr1),part1) ); wait;
        print("part1: "+ part(quote(xpr),part1) ); wait;
        print("part2: "+ part(quote(xpr),part2) ); wait;
    END;
#end

prg_cas((x^3/x^2)) [ENTER]
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-09-2016 06:32 PM



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