mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
restored gfcc example (GF C compiler)
This commit is contained in:
20
examples/gfcc/abs.c
Normal file
20
examples/gfcc/abs.c
Normal file
@@ -0,0 +1,20 @@
|
||||
int abs (int x){
|
||||
int y ;
|
||||
{
|
||||
if (x < 0){
|
||||
y = 0 - x ;
|
||||
}
|
||||
else {
|
||||
y = x ;
|
||||
}
|
||||
}
|
||||
return y ;
|
||||
} ;
|
||||
int main () {
|
||||
int i ;
|
||||
i = abs (16);
|
||||
printf ("%d",i) ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user