From 2c60a2d82a0d7b90924e7dbbcacf36afb8549d17 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 23 Sep 2004 14:41:42 +0000 Subject: Ints n --- examples/gfcc/compiler/abs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/gfcc/compiler/abs.c (limited to 'examples/gfcc/compiler/abs.c') diff --git a/examples/gfcc/compiler/abs.c b/examples/gfcc/compiler/abs.c new file mode 100644 index 000000000..c93b703b6 --- /dev/null +++ b/examples/gfcc/compiler/abs.c @@ -0,0 +1,12 @@ +int abs (int x){ + if (x < 0){ + return 0 - x ; + } + else return x ; + } ; +int main () { + int i ; + i = abs (16); + } ; + + -- cgit v1.2.3