Re: Curly bracket question
- From: Robert Adsett <sub2@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 29 Mar 2008 12:32:52 -0500
In article <aqqqu3dmjrvenn570fe25p0v2o6k4380h0@xxxxxxx>, Martin Griffith
says...
On Fri, 28 Mar 2008 21:51:42 -0000, in comp.arch.embedded Grant
Edwards <grante@xxxxxxxx> wrote:
On 2008-03-28, Martin Griffith <mart_in_medina@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
Well, you're probably missing a '}'. :)
I counted all the brackets, even gave them names, I could not
find where to put it.
If you're using any decent programming editor, it should be
pretty obvious where to put it, since the indentation level
won't "look right" somewhere.
I'm just using the standard Raisonance kit, I don't know how to
patch in a descent editor. I've got stuff like PN2, but there seems to
be little advice on how to stuff it into my compiler
Unless, the compiler is shockingly bad it will be using simple text
files. You can just edit them outside of the IDE and use them in the
IDE. Some IDE's even detect files that change while they are loaded.
Even shockingly bad IDEs often allow exporting and importing text files
which you can then edit. I've done this with PLC IDEs.
If you are running Windows you might take a look at Notepad++. Not high
end but easy enough to start with.
Longer term, I strongly recommend PC-Lint (and turn the errors up until
they are slightly painful). It's feedback will help you learn good
habits quickly. Don't let a warning pass without understanding its
source.
Alternatively, run the program through indent or astyle and
look at the output to see where the indentation isn't right.
I stuck an extra bracket at the end of main()
It, the ***, was happy.
I don't see how you expect the compiler to know where the
missing bracket belongs.
But nothing worked, not even InitLCD, first thing in main().
Raisonance doesn't seem to have much of a back up system, andd
it cost me ( on my 60'th birthday) about 5 hours.
I don't get it: what do you mean by "a back up system"?
My 1996 PCB design package has 4 undo files levels, *.bak1,*.bak2 etc,
all the raisonance stuff is have a single .bak file
Not as quick as getting even a halfways decent editor but take a look at
a version control system. When I'm working on a project any version
that actually compiles gets archived.
Robert
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Curly bracket question
- From: Grant Edwards
- Re: Curly bracket question
- References:
- Curly bracket question
- From: Martin Griffith
- Re: Curly bracket question
- From: Grant Edwards
- Re: Curly bracket question
- From: Martin Griffith
- Curly bracket question
- Prev by Date: Re: Curly bracket question
- Next by Date: Re: Speeding up a "for" loop (8051)
- Previous by thread: Re: Curly bracket question
- Next by thread: Re: Curly bracket question
- Index(es):