[Prev][Next][Index]
Re: for loops
- From: "Beata Winnicka" <bfatyga@slab.cica.indiana.edu>
- Date: Wed, 22 Jun 94 08:55:23 -0500
- To: jlliu@ie.nsysu.edu.tw (Liu Je-Lian)
- Subject: Re: for loops
- Cc: sage-bugs@cica.indiana.edu
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