GOLF(2gg)
π GOLF(2gg) β okay bestie, let's talk output-statement
Welcome to the manual page for GOLF(2gg) β the development docs, the ones you actually need. Sit down, grab a boba, we're doing this. π
β¨ NAME β¨
output-statement β (output) β the statement that puts text on the screen, fr fr.
π― PURPOSE π―
Output text. That's it. That's the whole job description. Iconic, honestly. π
π§ SYNTAX π§
@<text>
!<verbatim text>
Two moods, both slay. πΈ
π DESCRIPTION π
So here's the vibe: you want to output some free form text? You start the line with @ or !. That's the whole entry fee. The text gets output unencoded, and a new line gets appended to it. Periodt.
With the @ statement, any inline-code executes, and whatever output comes out of those statements gets output too. It's giving main character energy β everything runs. π₯
With the ! statement, all text is output verbatim, and any inline code is not executed. Super useful when the text you're printing should not be checked for any inline-code. Sometimes you just wanna say the thing without the thing doing anything, yk? π«Ά
Okay now the fine print, and I need you to actually read this part:
- All trailing whitespaces are trimmed from each source code line. π
- If you need to write trailing whitespaces, with the
@statement you can useprint-outas inline-code. Workaround queen. π - Maximum line length is
8KBβ and that's the source code line length. The actual run-time output length is unlimited. So breathe, bestie, your output can be as long as it wants. π
β οΈ Note that all characters are output as they are written, including the escape character (\). If you wish to output characters requiring an escape character, such as new line and tab (as is done in C by using\n,\tetc.), useprint-outas inline-code. No cap β the backslash is not doing magic tricks for you here. π
π EXAMPLES π
π Outputting "Hello there"
@Hello there
Simple. Clean. Ate. β¨
π¦ Mixing in other Golf statements
You can use other Golf statements inlined and mixed with the text you are outputting:
set-string weatherType="sunny"
@Today's weather is <<print-out weatherType>>
which would output
Today's weather is sunny
Look at that. The inline-code ran and everything. We love a collab. π
π The ! statement doing the same thing
With the ! statement, the text is also output, and this example produces the same "Hello there" output as @:
!Hello there
Same energy, different font. πΈ
π But here's the contrast
In contrast to @, the ! statement outputs all texts verbatim and does not execute any inline code:
set-string weatherType="sunny"
!Today's weather is <<print-out weatherType>>
which would output
Today's weather is <<print-out weatherType>>
Not me showing you the raw text just sitting there untouched. That's the whole point though β nothing got executed. π
π SEE ALSO π
Outputfinish-outputflush-outputoutput-statementprint-formatprint-outprint-path- See all documentation
Okay that's the whole page, you're officially a Golf output-statement girlie now. Go forth and print things. π¦
This edition was brought to you by version $VERSION on $DATE β from the GOLF(2gg) development era. Stay slay, stay documented, 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