Re: Curly bracket question
- From: "robertwessel2@xxxxxxxxx" <robertwessel2@xxxxxxxxx>
- Date: Fri, 28 Mar 2008 19:35:20 -0700 (PDT)
On Mar 28, 4:20 pm, Martin Griffith <mart_in_med...@xxxxxxxx> wrote:
Doom and Gloom ( and couple glasses of wine).
Last night I just compiled my little project, with the 4k limited
Raisonance C complier for the 8051/2
" missing } " it said, you have been naughty
I counted all the brackets, even gave them names, I could not find
where to put it.
I stuck an extra bracket at the end of main()
It, the ***, was happy.
But nothing worked, not even
InitLCD, first thing in main().
Raisonance doesn't seem to have much of a back up system, and it cost
me ( on my 60'th birthday) about 5 hours.
Any hints /tips/ goto keil, do not pass go, on the missing bracket
syndrome
The missing brace can hide in one of the header files.
One technique is to binary search for the point where adding the extra
brace fixes things. If it fixes it at the end of main(), try moving
it nearer the beginning of the source file (keeping it outside other
definitions, like routines, structures, or initialization lists). At
some point you'll go too far and you'll get the opposite message
("unexpected left brace") and you'll know the problem is below that
point.
If you discover that the problem is fixed by putting a brace just
after an #include (and not when its on the prior line), the problem
will be in the include.
.
- Follow-Ups:
- Re: Curly bracket question
- From: Hans-Bernhard Bröker
- Re: Curly bracket question
- References:
- Curly bracket question
- From: Martin Griffith
- Curly bracket question
- Prev by Date: Re: Feasible to implement a router on a system on a chip?
- Next by Date: FPGA beginner video guide, blog comments by Max Maxfield
- Previous by thread: Re: Curly bracket question
- Next by thread: Re: Curly bracket question
- Index(es):