[SDL] [tad off topic] Check out Linux Journal...
David Olofson
david at gardena.net
Sat Dec 16 15:16:43 PST 2000
On Saturday 16 December 2000 00:57, William Kendrick wrote:
> Someone said:
> > William Kendrick wrote:
> > > But you CANNOT do this!!!
> > >
> > > int small_function(int arg)
> > > return some_value;
> > >
> > > You NEED braces for functions, even if they're only one
> > > statement.
> >
> > How else will the compiler distinguish things like global
> > variable declarations, or function attributes?
>
> Huh? Since when can any part of:
>
> int small_function(int arg)
> return some_value;
>
> be seen as a variable declaration!? :)
If you've tried writing a parser for a C-like language using yacc
(GNU bison would be the most common implementation on GNU/Linux
systems, I think) or similar, you'd see why. ;-)
Ok, i *would* be possible to do with some hacks, but it would
increase the chance of minor typos leading to totally
incomprehensible compile error messages. Not fun...
//David
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david at linuxdj.com -'
More information about the SDL
mailing list