3

Can anyone point me towards the syntax for extern declarations in Genie. Extern decls are supported in Vala, therefore they should also be available in Genie but I cannot seem to hit on the correct syntax. I'm trying to expose the C "exit" function so I can quit the application after an exception has occured.

Vala syntax for extern:

extern void exit(int exit_code);

Genie syntax for extern?

extern def exit(exit_code:int):void

Obviously this syntax is incorrect or I wouldn't be asking this question :) but I think this is approximately the form it should take, can anyone assist?

Thanks - G

Gearoid Murphy
  • 11,834
  • 17
  • 68
  • 86

1 Answers1

2

Derp!, I figured it out eventually, the problem was with my use of the indent declaration to specify the 4 space indentation style I favour. This must be the first declaration in the code, but I had foolishly placed the extern declaration before the indent declaration.

The correct syntax is as follows:

[indent=4]
def extern exit(code:int):void
Gearoid Murphy
  • 11,834
  • 17
  • 68
  • 86