GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) β€” boolean-expressions πŸ’–

okay bestie so you're reading the Golf docs, section 2gg, and this one is all about booleans. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

boolean-expressions β€” Golf documentation (booleans) πŸŽ€


🌸 DESCRIPTION 🌸

A boolean expression is literally just you combining stuff with operators and getting a true or false back. the whole vibe:

  • ! β€” not (flips it, iconic)
  • && β€” and (both gotta be yes)
  • || β€” or (one of them being yes is enough, no cap)

and you also get parenthesis () to group things however you want. the way that parentheses just keep everything in check? obsessed πŸ’…

for example:

set-bool b1 = ! (b2 && b3) || b4

see how that reads? chef's kiss 🧚

You can use boolean expressions anywhere a boolean is expected as an input to any statement. fr fr, anywhere. it's giving main character energy in every statement that'll take one.

And ngl you're not limited to fancy operators either β€” you can use boolean variables as well as constants such as true and false in boolean expressions. so yes, true and false are valid little guys to drop in there. periodt ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

  • Booleans πŸ’œ
  • boolean-expressions
  • set-bool
  • See all documentation 🌈

and that's the whole page bestie, you ate it πŸ’– this was the GOLF(2gg) boolean-expressions page, dated $DATE, version $VERSION, and if you need me I'll be in the SEE ALSO section. bye bye πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from