Bennu Game Development

English Forums => Suggestions => Topic started by: Sandman on December 04, 2008, 11:17:48 PM

Title: [BUG] Using variable called 'next' in a Type fails (conclusion: not a bug)
Post by: Sandman on December 04, 2008, 11:17:48 PM
This works:
Type Entry;
    Entry* zomg;
End


This doesn't:
Type Entry;
    Entry* next;
End

Result:
file.prg:2: error: END expected ("*")
Somehow only failed when using a variable called 'next' in a Type.

[EDIT]
Conclusion:
Not a bug, as can be concluded from the replies.
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: SplinterGU on December 04, 2008, 11:30:12 PM
next is reserved word...
check c_main.c, you'd must know it...
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: Sandman on December 05, 2008, 12:02:54 AM
I will tell it even more awesome: I have no clue what it does. :P

[EDIT]
I also browsed through my DIV manual, but couldn't find it. If I had to guess though, it would be to go to the next Case in a Switch statement? Ugh I dunno!  ;D
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: SplinterGU on December 05, 2008, 12:18:26 AM
reserved for error handling
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: Sandman on December 05, 2008, 12:20:21 AM
Okay, still don't know it. Is there some documentation on it somewhere? Could you explain it otherwise?
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: SplinterGU on December 05, 2008, 12:32:38 AM
http://forum.bennugd.org/index.php?topic=102.msg1185#msg1185
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: Sandman on December 05, 2008, 12:43:28 AM
Alright, looks interesting. Don't quite understand it all though.

I must say that I find the reservation of 'next' quite annoying. From the looks of it, it doesn't seem to hurt the grammar if you made it possible to have variables called 'next', or am I wrong here?
Title: Re: [BUG] Using variable called 'next' in a Type fails
Post by: SplinterGU on December 05, 2008, 12:53:57 AM
sorry... use _next