Skip to main content

Timeline for Correct For Loop Design

Current License: CC BY-SA 3.0

2 events
when toggle format what by license comment
May 12, 2012 at 23:59 comment added Yttrill C's for loop does not universally handle all cases with a fixed comparison in the predicate. If you use < you cannot stop a loop which reaches the maximum value of the control variable type (for some types). If you use <= you cannot skip the body of the loop for zero cases. There is therefore no formulation for an arbitrary integral type which works correctly for 0 upto and including maximum value of the type. You need to understand my problem: I am generating code (not hand writing it) for unknown type with unknown bounds.
May 11, 2012 at 22:47 history answered James Youngman CC BY-SA 3.0