View Issue Details

IDProjectCategoryView StatusLast Update
0000355LDMud 3.3LPC Languagepublic2005-05-15 15:02
Reportermenaures Assigned Tolars 
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Fixed in Version3.3 
Summary0000355: ranged foreach is a no-op for __INT_MAX__
DescriptionI know, kind of nit-picky to report this. Sorry about that.

foreach(i : x..y) just doesn't do anything when y == __INT_MAX__.

Although the behaviour is largely documented, I think that's actually a typo:

"If <expr1> is less than <expr2>, the loop will terminate at once."

It's supposed to be the other way around (<expr1> greater than <expr2>). Maybe add a note here that <expr2>==__INT_MAX__ doesn't work either?
TagsNo tags attached.

Activities

lars

2005-01-31 03:34

reporter   ~0000318

Easy to fix: corrected in 3.3.665.

menaures

2005-01-31 05:13

reporter   ~0000319

still happens for __INT_MIN__..__INT_MAX__ *runs away*

lars

2005-02-01 00:25

reporter   ~0000321

You just _had_ to try that, do you? I should have known! :-)

I have add an internal flag for this special case in 3.3.666.

Issue History

Date Modified Username Field Change
2005-01-30 09:47 menaures New Issue
2005-01-31 03:34 lars Status new => resolved
2005-01-31 03:34 lars Fixed in Version => 3.3
2005-01-31 03:34 lars Resolution open => fixed
2005-01-31 03:34 lars Assigned To => lars
2005-01-31 03:34 lars Note Added: 0000318
2005-01-31 05:13 menaures Status resolved => feedback
2005-01-31 05:13 menaures Resolution fixed => reopened
2005-01-31 05:13 menaures Note Added: 0000319
2005-02-01 00:25 lars Status feedback => resolved
2005-02-01 00:25 lars Resolution reopened => fixed
2005-02-01 00:25 lars Note Added: 0000321
2005-05-15 15:02 lars Status resolved => closed