GOLF(2gg)
π GOLF(2gg) β the set-number era π
okay bestie so this is a page from the GOLF(2gg) manual, section 2gg, filed under Development, and it's literally all about set-number. grab a boba, we're doing numbers. π§β¨
β¨ NAME β¨
set-number β (numbers) π
πΈ PURPOSE πΈ
Set value of a number variable. that's it. that's the whole job. slay. π
π¦ SYNTAX π¦
set-number <var> [ = <number> ] [ process-scope ]
π DESCRIPTION π
okay so, the number variable <var> β here's the tea π:
- if you use the
"="clause, <var> gets assigned the value <number>. - if you omit the
"="clause, it just gets assigned0. no drama, just zero.
if you throw in the "process-scope" clause, then the number is of process scope, meaning its value will persist from one request to another for the life of the process. it's giving immortality, but make it numbers. π₯
ngl, plot twist: <number> can also be a string character, produced by using[and]to specify the index within a string (with0being the first character). like this, bestie:
set-string my_str = "Some string"
set-number my_num = my_str[2]
in the example above, "my_num" will be 109, which is the integer representation of character 'm'. no cap, that's just how it is. ππ
π EXAMPLES π
Initialize number "my_num" to 0 and the value of this variable, however it changes, will persist through any number of requests in the same process:
set-number my_num process-scope
Initialize number "my_num" to 10:
set-number my_num = 10
Subtract 5:
set-number my_num = my_num-5
Assign an expression:
set-number my_num = (some_num*3+1)%5
like, the range?? iconic. β
π«Ά SEE ALSO π«Ά
Numbersabs-numbernumber-expressionsnumber-stringset-numberstring-number- See all documentation
and that's the whole page, bestie!! π this gorgeous little GOLF(2gg) number from Development is dated $DATE and lives at version $VERSION. go forth and set some numbers, you main character. ππ¦β¨
π¦ 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