GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) β€” the flush-output page, bestie edition πŸ’–

okay so you opened the GOLF(2gg) manual and landed on this one, and honestly? you're in the right place. this is the page about making your output show up now instead of whenever your program feels like it. let's go 🫢


✨ NAME ✨

flush-output β€” it's an output thing πŸ’… (lives in the (output) family, iykyk)


🎯 PURPOSE 🎯

Flush output. that's it. that's the whole job. iconic behavior honestly 🌸


πŸŽ€ SYNTAX πŸŽ€

flush-output

no arguments, no drama, just vibes ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Use the flush-output statement to flush any pending output. like, everything that's been chilling in the buffer? gone. sent. out into the world πŸ’«

this is lowkey useful when the complete output would take longer to produce and you need intermittent partial output to actually show up. because otherwise you'd be sitting there staring at a blank screen like 😭 where is it???

so: big slow output? flush-output is your girl. periodt πŸ‘‘


🌈 EXAMPLES 🌈

ok so in this case the complete output may take at least 20 seconds. twenty. seconds. a whole eternity in group-chat time. but with flush-output, the message "This is partial output" will be flushed out immediately. slay.

@This is partial output
flush-output
sleep(20);
@This is final output

see how the partial message escapes first and the final one comes after the sleep(20);? that's the whole point bestie, the vibe check passed βœ…


πŸ‘€ SEE ALSO πŸ‘€

  • Output
  • finish-output
  • flush-output
  • output-statement
  • print-format
  • print-out
  • print-path
  • See all documentation

ngl if you skip flush-output and your program looks frozen, that's not a bug, that's just you not flushing. no cap. πŸ’€

mwah πŸ’‹ that's the page, go forth and flush responsibly.

this has been your girl, signing off from the GOLF(2gg) manual β€” version $VERSION, dated $DATE πŸŽ€βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from