GOLF(2gg)
π GOLF(2gg) π
okay bestie, welcome to the Development corner of the manual, section 2gg, and today's main character is literally the loop-breaker herself. no cap, she's iconic. let's get into it. π
β¨ NAME β¨
break-loop β and her lil vibe tag is (program-flow) π¦
π― PURPOSE π―
she exits a loop. that's it. that's the whole job. periodt. π
π SYNTAX π
break-loop
look at her. no args. no drama. just vibes. β¨
π« DESCRIPTION π«
so here's the tea, bestie π β break-loop dips out of a loop early. and when I say "a loop," I mean any of these three situations:
- between
start-loopandend-loop - between
run-queryandend-query - between
read-lineandend-read-line
once she's made her exit, execution just... keeps going. right after the end of the loop. like nothing happened. main character energy honestly. π
ngl this is the "okay I've seen enough, we're done here" button and she serves. π₯
π EXAMPLES π
okay so imagine you wanna bail out after 300 loops even though the loop was set to run 1000 times. she's gonna do that. watch:
set-number max_loop = 300
start-loop repeat 1000 use i start-with 1
@Completed <<print-out i>> loops so far
if-true i equal max_loop
break-loop
end-if
end-loop
see how max_loop is 300 but the loop says repeat 1000? yeah. break-loop is the reason that's not a problem. she hits 300, checks if-true i equal max_loop, and π¦ poof π¦ β out. slay. π
π SEE ALSO π
Program flow β go read that too, fr fr, it's giving essential. π«Ά
break-loopcall-handlercode-blockscontinue-loopdo-onceexit-handlerif-definedif-truequit-processreturn-handlerstart-loop
and yeah, you can See all documentation if you wanna go full goblin mode and read everything. ππ
okay that's the whole page bestie, tysm for reading, ily, go break some loops responsibly π
this cutie was brought to you by $VERSION, dated $DATE β see you in the next manpage, mwah πβ¨
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms