How is defined precedence with "(" and ")"

From: <cbraz_at_alanet.com.br>
Date: Wed 14 Apr 2004 03:24:11 AM GMT
Message-ID: <010e01c421cf$f64fd370$2806520a@cbraz>
        I'am trying to create a expression like (2 + 10) * 4.

        Of course i can do  EC_word x = (2 + 10) * 4 and it's work fine. 

        But i need to create a general expression at run time. If i do

        term(EC_functor("+",2), 2 , term(EC_functor("*",2),10,4 ) )  it's evaluate to 
        
        42 and not to 48 because it's the same of 2+10*4. How can i define the precedence
    
        in this situation? 

        Note that if i construct the expression like term(EC_functor("*",2), 4 , term(EC_functor("+",2),2,10 ) ) 

        it will evaluate to 48 because i make the sentence respecting the operators precedence, but this way 
    
        appears inviable for my purposes.


        Thanks  
    
        
Received on Wed Apr 14 05:23:55 2004

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:28 PM GMT GMT