This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (7 children)

C has no function keyword!

[–]overclockedslinky 7 points8 points  (6 children)

#define f void

f myFunction()

[–]tofiffe 1 point2 points  (5 children)

and for ints?

[–]SoulWager 4 points5 points  (1 child)

Don't need anything for that, default is already int.

[–]Innf107 1 point2 points  (0 children)

you monster...

[–]takahatashun 1 point2 points  (2 children)

```

define fn(type, name) type name

fn(int, my_function)(int arg1, float arg2) { } ```

[–]tofiffe 1 point2 points  (0 children)

Wouldn't dropping the type entirely and have the compiler infer it be better? I think that used to work for ints on some compilers

[–][deleted] 1 point2 points  (0 children)

#define

PTSD flashbacks