Post Reply 
Solution to the problem of pre-assigned variables to 0
11-11-2018, 01:57 PM
Post: #2
RE: Solution to the problem of pre-assigned variables to 0
Hello, in the first code using quotation marks the expression is not evaluated, that is to say it is kept symbolic.


PHP Code:
#cas
prg01(  ):=
    
begin
        
PRINT; 
        print(   
'X²/3 - Y²/5 = 1'  );  // ' Do not evaluate
        
print(   //1  );  //  X -> 0
        
return 'X²/3 - Y²/5 = 1' ;
    
end;
#end 
prg01( ) [enter]
show
X²/3 - Y²/5 = 1
0=1


in the second code, assume X as symbolic, there is no need to use ' '
this same procedure should work assuming X as noValue

PHP Code:
#cas
    
prg02(  ):=
    
begin
        local X
Y
        
assume(Xsymbol); //  assume X as symbolic
        
assume(Ysymbol); 
        print( 
//);
        return  
//1;
    
end;
#end 
prg02( ) [enter]
show
X²/3 - Y²/5 = 1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solution to the problem of pre-assigned variables to 0 - compsystems - 11-11-2018 01:57 PM



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