[Prev][Next][Index]
Re: SgForStmt::step() returns null
- From: "Beata Winnicka" <bfatyga@slab.cica.indiana.edu>
- Date: Thu, 1 Sep 94 21:11:03 -0500
- To: jackg@cache.crc.ricoh.com
- Subject: Re: SgForStmt::step() returns null
- Cc: sage-bugs@cica.indiana.edu
Jack,
the SgForStmt::step() and SgForStmt::end() methods had a bug in
Sage++ 1.3. This has been fixed in the latest version, which will
be publicly available "really soon" now (within the next few days, I
think - somebody please correct me if I am wrong on this).
There have also been many more bug fixes since 1.3, especially in the
C++ parser - so if you find problems with it, you might want to wait
for the new release.
In the newest version, you would get:
current file is forloop.c
main(){
int x, y, z;
int w, q, j;
for (w = 0 ; w < 3 ; (w)++)
{
printf("y\n");
}
}
A FOR loop has been found
lower bound : w = 0
upper bound : w < 3
step : (w)++
Note that step is w++ and end is w < 3; you had them reversed in your
message, I assume it's just a typo.
Hope you do not mind the extra ().
I have also seen your mail about the innermost loop problem. I do not
recall seeing it before, so there is a possibility that this is a
not-yet-fixed bug. I'll take a closer look tomorrow.
Thanks for your bug reports, we always very much appreciate such
reports from Sage users.
--Beata