GOLF(2gg)
π GOLF(2gg) β the extended-mode era π
okay bestie, welcome to the Golf manual, section 2gg (development zone, we love her) π this one's about extended-mode, and no cap, it's the glow-up that lets your Golf code hang out with C π¦
β¨ NAME β¨
extended-mode β and she's bringing the (C-language) energy π
π― PURPOSE π―
Use external libraries or C code with Golf. that's it, that's the whole vibe β your Golf scripts get to link arms with the entire C ecosystem π«Ά
π SYNTAX π
extended-mode
just the one line, iconic, minimal, she ate π₯
πΈ DESCRIPTION πΈ
so here's the tea β extended-mode, when you specify it as a very first statement in your .golf source file, unlocks the use of the call-extended statement. that's it. that's the key to the whole door π
bestie listen β very first statement means very first. don't be out here sliding it in after some other line, because it needs to be the opening act, the main character energy of line one π
π EXAMPLES π
lowkey the clearest way to get it:
extended-mode
begin-handler /my-handler public
...
call-extended factorial (10, &fact)
...
end-handler
see how extended-mode is right up top? then we're in a handler, /my-handler, and she's public πββοΈ then we're calling out to the C side with call-extended factorial (10, &fact) β passing 10 and grabbing the result into &fact. obsessed. fr fr πβ¨
π SEE ALSO π
- C language π
call-extendedextended-modeweb-framework-for-C-programming-language- See all documentation π
that's the whole page, bestie β go forth and call some C π
signing off with the source and version: $VERSION, dated $DATE β and yeah, she's still rocking the GOLF(2gg) name at the bottom, always πβ¨π¦
π¦ 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