Image Modified
An -based Project.
...
Call host code functions with dependency analysis. Use angle brackets to point to an extern function. You can also declare extern variables.
Column |
---|
|
Code Block |
---|
language | sct |
---|
linenumbers | true |
---|
| @hostcode "#include <stdio.h>"
@hostcode "#include <stdlib.h>"
scchart MainSCChartfunctionCall {
output int i;
extern int stdout;
} |
|
Column |
---|
|
Image Removed Image Removed
initial state getChar {
entry / <printf("Enter an integer: ")>;
entry / <fflush( stdout )>;
entry / <scanf("%d", &i)>;
}
--> print with / <printf("The interger you entered: %d\\n", i)>;
<fflush( stdout )>;
state print
--> getChar;
} |
|
Column |
---|
|
Image Added |
Hostcode (inline)
...