Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serious FOR bug in latest dev build s1964
#8
@Boriel,

Yeah I got a bit carried away and my hack will probably crash or fail it encounters non-constant values but maybe there's still some potential there if some protective code were added for the non-constant cases.

I guess I naively thought that a FOR loop did work like DO UNTIL but I see that even with sinclair BASIC it works more like a C for loop so its obviously standard behaviour.

Probably the most important thing right so is to add the missing 'implicit' warning for FOR (when not using --explicit).

@Einar,
Actually the compiler does consider all three because it calls common_type twice. So hopefully your cases would be handled OK. My hack would still fail with variable upperbound and step of course...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)