GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

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

okay so this is the set-bool page from the GOLF manual, section 2gg, filed under Development. she's little, she's iconic, she sets booleans. let's GO πŸŽ€


✨ NAME ✨

set-bool β€” (booleans) 🫢


🌸 PURPOSE 🌸

Set the value of a boolean variable. that's it. that's the whole job. and she does it flawlessly. πŸ’…


πŸ¦‹ SYNTAX πŸ¦‹

set-bool <var> [ = <boolean> ] [ process-scope ]

set-bool <var> from-condition <condition>

two whole ways to do the thing. pick your fighter. ⭐


πŸ‘‘ DESCRIPTION πŸ‘‘

πŸ’œ WITHOUT FROM-CONDITION CLAUSE πŸ’œ

if you're not using the from-condition clause, then the boolean variable <var> gets either:

  • the value <boolean> handed to it via the = clause, OR
  • false, like, automatically, if you just... skip the equals clause (=) entirely.

no equals, no problem, she defaults to false and moves on. πŸ™ˆ

and listen β€” if you throw in the process-scope clause, then your boolean is of process scope, which means its value persists from one request to another for the life of the process. it does not reset. it remembers. main character memory. πŸ”₯

🧚 WITH FROM-CONDITION CLAUSE 🧚

if the from-condition clause is not used, then <condition> gets evaluated, and:

  • if it's true β†’ true gets assigned to <var> ✨
  • otherwise β†’ false gets assigned πŸ’€

ngl if you wanna know more about <condition>, go read if-true. she's the expert. iykyk. πŸ‘‘


🌈 EXAMPLES 🌈

Assign true value to boolean variable my_bool:

set-bool my_bool = true

Assign boolean value based on condition:

...
set-bool my_bool from-condition num1 equal num2 or str1 not-equal str2

like look at that second one. num1 equal num2 OR str1 not-equal str2. she's reasoning. she's evaluating. she's deciding. obsessed. πŸ˜­πŸ’–


πŸ“ SEE ALSO πŸ“

  • Booleans
  • boolean-expressions
  • set-bool
  • See all documentation

heads up bestie: set-bool shows up in its own SEE ALSO, which is giving self-love and honestly? valid. 🫢

mwah β€” that's the whole page! this one's from $VERSION, dated $DATE, and it lives in the GOLF(2gg) manual. go set some booleans, you absolute legend. periodt. πŸ’…βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from