On Thu, 3 Sep 2026 12:19:25 +0200, fir wrote:
for example i noticed that continue and break in function seem to
have sense
for example
foo()
{
int dx = rand2(-1,1);
int dy = rand2(-1,1);
if (!dx & !dy) continue;
// ....
}
i mean you want a 9 values, pairs of -1,0,1 but you dont want 0,0
(thus you want 8 values)
this continue is handy and simplifies code imo
I?m not sure what it?s supposed to mean, anyway. Where does the
?continue? transfer control *to*?
as to break, par some kind of analogy you could use break and break
just would work like return so in some way one could said its more
natural than return ...
That part I can agree with. I?m not a fan of early returns. If a
function result was always assigned at the end, then all intermediate
exits from blocks could be done with break.
--- PyGate Linux v1.5.19
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)