[Prev][Next][Index]

Re: for loops



Dear Liu,
it is relatively straightforward to get the values you want from the  
expressions, for example, for the assignment expression you just need  
to check what is the value on the right-hand-side (using  
SgExpresion::rhs(); for the inequality case you need to distinguish  
between LT_OP and LE_OP; and for the step you need to take into  
account various ways in which it can be specified. All this can be  
done using methods of Sage++.
I was somewhat surprised to hear that:
"I can only
get the expressions, but I cannot get the value of the bounds."
The version of Sage that I am using has a bug in SgForStmt::end() and 

SgForStmt::step() methods. As a result I can only get  
SgForStmt::start() to work at the moment. (I am working on fixing  
this bug right now). Which version of Sage are you using?  --Beata