io@piefed.blahaj.zone to Programmer Humor@programming.devEnglish · 22 days agowith a break statement right?piefed.cdn.blahaj.zoneimagemessage-square39fedilinkarrow-up1565arrow-down114file-text
arrow-up1551arrow-down1imagewith a break statement right?piefed.cdn.blahaj.zoneio@piefed.blahaj.zone to Programmer Humor@programming.devEnglish · 22 days agomessage-square39fedilinkfile-text
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up4·22 days agoYou can have a non-infinite loop without a break statement, you just need a return statement in it. Also for(;;) is much faster to write than while(true).
You can have a non-infinite loop without a break statement, you just need a return statement in it. Also
for(;;)is much faster to write thanwhile(true).