/samples/autoreturn/trivial.ooc

http://github.com/nddrylliog/oc · Unknown · 13 lines · 9 code · 4 blank · 0 comment · 0 complexity · 89c4bb88067920ba2223bb6d7e08eadd MD5 · raw file

  1. printf: extern func
  2. gen: func -> int {
  3. printf("Oh, I can see it coming\n")
  4. printf("There it goes\n")
  5. printf("Almost there\n")
  6. printf("That's it, now we have it\n")
  7. 42
  8. }
  9. printf("Hey, the value is %d\n", gen())