io@piefed.blahaj.zone to Programmer Humor@programming.devEnglish · 1 month agowith a break statement right?piefed.cdn.blahaj.zoneimagemessage-square40linkfedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1imagewith a break statement right?piefed.cdn.blahaj.zoneio@piefed.blahaj.zone to Programmer Humor@programming.devEnglish · 1 month agomessage-square40linkfedilinkfile-text
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up0·1 month 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).