From: G DOT DegliEsposti AT ads DOT it To: djgpp AT delorie DOT com Message-ID: Date: Wed, 28 Jan 1998 09:39:45 +0100 Subject: Re: readkey() Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Precedence: bulk > Hmm well I was messing around with the allegro readkey command and it > gave me this starnge errorhere is the code. > > { > int allegro_init(); > int install_keyboard(); > > printf("think I got it.\n"); > int readkey(); > return(0); > } > > and when its compiling Rhide says there is a parse error before int in > the readkey line...yet if I place that line somewhere else it doesnt say > anything..plus it doesnt work...just wonderin. It is not so strange... this happens because you are confusing function declaration with function call: int allegro_init() declares allegro_init as a function returning an integer, but does not call it. In C declaration are correct if they come before every other statement in the block. This means that allegro_init and install_keyboard are interpreted silently as declarations before a statement, while readkey is interpreted as a declaration between two statement, which is not allowed in C, hence the error you get. if you remove the "int" you will remove *both* the errors :-) ciao Giacomo