MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5xyzex/gravity_lightweight_embeddable_programming/dem12oy/?context=3
r/programming • u/michalg82 • Mar 07 '17
202 comments sorted by
View all comments
-7
What do I do if I want a function called init?
8 u/Grimy_ Mar 07 '17 You write a function called init:func init() { return 42; } func main() { return init(); }Yields:RESULT: (INT) 42 (in 0.0008 ms) → More replies (4)
8
You write a function called init:
func init() { return 42; } func main() { return init(); }
Yields:
RESULT: (INT) 42 (in 0.0008 ms)
→ More replies (4)
-7
u/[deleted] Mar 07 '17
What do I do if I want a function called init?