Skip to content
Snippets Groups Projects
Commit 98b344b1 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

test: new features in funcdef.st

parent b3a9a7f2
No related branches found
No related tags found
No related merge requests found
......@@ -5,18 +5,9 @@ option +r;
int x;
assign x;
ss simple {
state simple {
when () {
void *p = f1();
p = f2(p,(double **)f1a);
pvSetX(1.0);
} exit
}
}
void *f1(void)
{
pvPut(x);
return 0;
}
......@@ -25,6 +16,20 @@ void *f1a()
return 0;
}
/* forward declarations */
void *f2(void *x, double **d);
void pvSetX(int val);
ss simple {
state simple {
when () {
void *p = f1();
p = f2(p,(double **)f1a);
pvSetX(1.0);
} exit
}
}
void *f2(void *x, double **d)
{
void *(*f)(void) = (void *(*)(void))x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment