Skip to content

Instantly share code, notes, and snippets.

@jerstlouis
Created October 18, 2013 09:09
Show Gist options
  • Save jerstlouis/7038791 to your computer and use it in GitHub Desktop.
Save jerstlouis/7038791 to your computer and use it in GitHub Desktop.
import "ecere"
struct __ecereClosure1DataStruct
{
int * x;
};
static int __ecereClosure1(struct __ecereClosure1DataStruct * __ecereClosure1Data, int y)
{
return (*__ecereClosure1Data->x) + y;
}
class MyApp : Application
{
void Main()
{
int x = 10;
// PrintLn( ((int y) => x+y) (1337) );
{
__ecereClosure1DataStruct __ecereClosure1Data = { &x };
PrintLn(__ecereClosure1(&__ecereClosure1Data, 1337));
}
system("pause");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment