Skip to main content
gamedev.net
🔒 Locked

strange function syntax

Started by dbrayford 1 reply 650+ views
Original Post
dbrayford
dbrayford

I came across this function void int_add( a, b, c) BIGINT *a, *b, *c; { and am confused by the syntax. I assume it is the same as void int_add(BIGINT * a, BIGINT * b, BIGINT * c){
However, as i haven't come across this syntax I wasn't sure.
ChaosEngine
ChaosEngine
That's the old K&R style C function syntax. I believe most compilers still support it (willing to be corrected though).

IIRC,
void int_add( a, b, c) BIGINT *a, *b, *c
and
void int_add(BIGINT * a, BIGINT * b, BIGINT * c)
are equivalent.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Buckeye
Buckeye
Note: as mentioned above, it's an old-style C function declaration. C++ compilers will probably tell you that a, b and c are undefined. Visual Studio does provide a clue with the error:

"'{' : missing function header (old-style formal list?)"
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.