You are viewing a single comment's thread.

view the rest of the comments →

0
1

[–] ghost_marauder 0 points 1 point (+1|-0) ago 

This prevents issues for the compiler during cyclic definitions

int f(int a){return g(a);}

int g(int a){return f(a);}

will spit out an error saying stuff was not declared.

int f(int a);

int g(int a);

int f(int a){return g(a);}

int g(int a){return f(a);}

will have no compiler issues. This is a leftover from the days when compilers didn't do any backtracking.

0
0

[–] shmuklidooha [S] ago 

Haha, thanks for the reply after all this time. Yeah, I finally realised what function prototypes were. Even if they're not being backtracked to, it's still good practice to do this.

0
1

[–] ghost_marauder 0 points 1 point (+1|-0) ago 

I didn't check the date. That whole board went down months ago. Heh!