C Coding style question

You drag the tab to where you want it. It's kind of weird, must be a Java thing. Try dragging it toward one of the edges of the open editor window and eventually, in my case at least, a splitter bar will pop up. If you let go of the mouse it will divide it there.

I don't know if that's standard Eclipse since I'm using Altera NIOS II IDE, which is based on Eclipse with the CDT plugin. Where exactly the editor functionality comes from is hard to say but my guess is that it's standard Eclipse editor stuff.

Try Window|Preferences. In the tree view on the left open "General|Editors|Text Editors". In my case there's a list box labeled "Appearance color options" with "Background color" and "Foreground color". Uncheck the "System Default" box and you're good to go.

I'm not a huge fan of Eclipse in general (can you say "hog") but I love the CVS integration. That really makes it fun to work with CVS.

Andrew

Reply to
andrew queisser
Loading thread data ...

To add to the enumeration of editors with the feature... Even Microsoft's DOS based ME (or just M) editor (which allows you to write C code, access an existing library of features, and link it in to extend the editor) did that. And it was just a DOS program dating to the mid part of the 1980's, I think. (I forget which assembler version I got my copy with, but it was towards the earlier end of the tool versioning.) alt-F6 key splits the screen, right where you have the cursor at, F6 toggles the cursor between them, F9+F6 kills the split screen mode. You can open files in either pane, they can be different or the same (initially, they start pointing at the same file), and if they are the same but panned about a little bit, changes in one show up instantly in the other pane as you'd expect.

Jon

Reply to
Jonathan Kirwan

Thanks for info. Well I would never have guessed the dragging the tab to get the two windows on the screen at the same time. Like you said in a previous post, not quite as simple as splitting a window in other editors, but at least it can be done.

Paul.

Reply to
Paul Taylor

I hate to join the language war, but ... ;-)

I dont' really want to address the PIC16 / 8051 issue.

However, the example above has no reference to STL, and thus I will classify it as C++ FUD.

The example *is* a template, but it is *not* STL. In general, templates are a type-safe and type-independent way to reuse behavior. A very useful tool where appropriate.

STL may be a *part* of the C++ language as a whole, but it is not a part of the compiler itself. Indeed, IMHO it is usually *not* a good thing to use in embedded system work, primarily because of its use of dynamic memory. I *do* however use templates and find them quite valuable for the purposes mentioned above.

Not that this has anything to do with the original question. :-)

--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
 Click to see the full signature
Reply to
Michael N. Moran

[...]

That was a *damn fine* text editor by the standards of the day - I was very disappointed when MS started shipping a nobbled version of the QuickBasic environment as its standard DOS editor!

pete

--
pete@fenelon.com "there's no room for enigmas in built-up areas"
Reply to
Pete Fenelon

I was an M/ME addict before becoming a Brief addict!

Arg Arg forever!

Andrew

Reply to
andrew queisser

HAs anyone stopped and wondered, what is the situation the OP is encountering. Whilst most have the ideal answer, no one actually knows what the OP is doing.

Example. IF I was using a 4 bit processor with stuff all mem, then I would use

#define SIZE_ARR 100

otherwise I would be type safe and use:

const SIZE_ARR = 100;

let the compiler do the work and find the errors... And that is before i get to the first question.

The first questi>When dealing with fixed size arrays I see two options for sizing arrays and

Reply to
The Real Andy

You lost me there. What do you mean by "stuff all mem"?

That wouldn't do at all because a variable in C, even if qualified "const", is not a compile-time constant. In particular, you can't

const size_t SIZE_ARR = 100; int myarray[SIZE_ARR];

in C90 (nor C99, for that matter).

Not in this case. Rare as it may be in this newsgroup, the OP actually asked a platform-independent question, so there's no good reason to insist on a platform-specific answer.

Reply to
Hans-Bernhard Bröker

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.