Dev c++ bold convention

P

pauldepstein

Could anyone explain the rule the Dev C++ compiler uses for deciding
whether to convert a display of a word to bold font?

A first attempt at an answer could be "Words are displayed in bold when
they have an assigned meaning in c++".

However, this answer doesn't quite work -- "main" does not get
converted automatically to bold, and nor do words for classes of
streams such as "iostream" for example. Surely, such words do have
assigned meanings.

Thank you.

Paul Epstein
 
M

mlimber

Could anyone explain the rule the Dev C++ compiler uses for deciding
whether to convert a display of a word to bold font?

A first attempt at an answer could be "Words are displayed in bold when
they have an assigned meaning in c++".

However, this answer doesn't quite work -- "main" does not get
converted automatically to bold, and nor do words for classes of
streams such as "iostream" for example. Surely, such words do have
assigned meanings.

Thank you.

Paul Epstein

This question, which is about a specific IDE, is off-topic in this
newsgroup, which is concerned with C++ language issues. Try in a
Dev-C++-specific newsgroup. See also this FAQ:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M

PS, I suspect only *reserved* words in C++ are highlighted. Functions
and parts of the standard library (e.g., main, printf, cout) don't
qualify.
 
P

pauldepstein

Well, the "PS" part of your answer leads to the c++ distinction between
reserved and non-reserved words. And it also points out that some
words which have distinct meanings like "main" etc. are nevertheless
not reserved.

The above two facts are facts about "the c++ language" however narrowly
you define the phrase.

By analogy, suppose someone says "I didn't understand ... in ...book on
c++". Are you then going to attack that person because this newsgroup
is only about the c++ language and not about c++ books?

Provided that the newsgroup allows elementary questions [my question
was certainly elementary], it is 100% on topic, and you are wrong to
criticise me for my posting.

However, if beginner questions are not allowed here, then, fair enough,
mea culpa, I stand corrected.

Paul Epstein
 
M

Mike Wahler

Could anyone explain the rule the Dev C++ compiler

It's not the compiler doing that, but your editor.
Not the same thing.
uses for deciding
whether to convert a display of a word to bold font?

A first attempt at an answer could be "Words are displayed in bold when
they have an assigned meaning in c++".

I think that's pretty much the answer. But note that
function names (including those from the standard library)
are not really considered part of the language 'proper',
as are keywords such as 'if' and 'for'.
However, this answer doesn't quite work -- "main" does not get
converted automatically to bold, and nor do words for classes of
streams such as "iostream" for example.

I presume you mean standard header names. The names themselves
are not part of the language, but part of the standard library.
But I suspect the keyword '#include' is somehow 'highlighted',
isn't it?
Surely, such words do have
assigned meanings.

Yes, but not by the language.

Some code editors and IDE's offer a facility where you can
add your own list of 'special' words and assign graphical
characteristics (e.g. 'bold' or color) to them. I don't
know if this is the case with yours. However there are
many 'syntax highlighting' editors available, both free and
commercial. Try a web search.

For future reference, note that issues like this are not
topical for comp.lang.c++, which is only for discussion
of the language itself, and not about specific tools such
as compilers or editors. This is why I've modified your
subject line with [OT].

Purpose of comp.lang.c++ :
http://www.slack.net/~shiva/welcome.txt

-Mike
 
M

Mike Wahler

Well, the "PS" part of your answer leads to the c++ distinction between
reserved and non-reserved words. And it also points out that some
words which have distinct meanings like "main" etc. are nevertheless
not reserved.

The above two facts are facts about "the c++ language" however narrowly
you define the phrase.

By analogy, suppose someone says "I didn't understand ... in ...book on
c++". Are you then going to attack that person because this newsgroup
is only about the c++ language and not about c++ books?

Provided that the newsgroup allows elementary questions [my question
was certainly elementary], it is 100% on topic, and you are wrong to
criticise me for my posting.

I would admit that a certain 'essence' of your query might
be considered topical (i.e. about the C++ language), but
part of it is not (the operation of your editor).

The part which is topical could be restated: "what comprises
a keyword or 'reserved' word in C++?" My answer is:

"Keywords" are those words 'built in' to the language, for which
no other 'outside' information is required for a translator
(a.k.a. 'compiler') to discern their meaning. Some examples are
'if', 'for', 'do', 'break'. The source of an exhaustive list
of these words would be a good C++ text, or of course the ISO
standard defining the language (ISO 14882).

"Reserved" words (or more formally, 'names' and names composed
in a specified way of particular characters) include keywords,
but also include entities such as standard library names and
names reserved to an implementation, such as those beginnning
with two underscores (__).

See my other posting in this thread for a suggestion.

However, if beginner questions are not allowed here,

Questions resulting from any level of knowledge and skill are
most welcome here, however they must be topical. My other
reply to your question I marked [OT], but in retrospect, perhaps
it should have been 'partly OT'. :)

then, fair enough,
mea culpa, I stand corrected.

I hope I've cleared things up at least a bit.

-Mike
 
P

pauldepstein

Thank you for your very detailed and useful information. I do
appreciate that.

However, I still maintain that I was 100% on topic. I'll show you why.

Suppose I said "My Dev C++ editor makes the words int, float, do
become bold. However, it doesn't do that with other words such as main
or iostream. Can you explain the essential conceptual difference
between the words in the above list which are made bold, and the words
which aren't?"

Since my query is now a request for explaining the difference between
two sets of c++ words, it is, from an absolutely narrow and pure
perspective, a c++ language question. This is because, in the above
quote, the fact that I spotted the difference in a dev c++ context is
purely an introduction to the real c++ question.

So I've proved that my new modified quotation is definitely on topic.

However, the above modified quotation is an extremely close paraphrase
of the posting that was unfairly attacked. (It was mlimber who was
unfair. I have no problem at all with Mike Wahler. In fact you've
been extremely generous and helpful.)

So, since the new modified quotation is on topic, my original posting
is also on topic.

I couldn't possibly have talked about "keywords" and "reserved words"
in my original posting (as you suggest) because I didn't know those two
phrases. If I was familiar with the concept, "reserved word", I would
have googled it and found out that way.

Paul Epstein
 
M

mlimber

Well, the "PS" part of your answer leads to the c++ distinction between
reserved and non-reserved words. And it also points out that some
words which have distinct meanings like "main" etc. are nevertheless
not reserved.

The above two facts are facts about "the c++ language" however narrowly
you define the phrase.

By analogy, suppose someone says "I didn't understand ... in ...book on
c++". Are you then going to attack that person because this newsgroup
is only about the c++ language and not about c++ books?

I humbly apologize if you took my response as an "attack." It was not
intended as such, and I hope you'll take it in the spirit in which it
was meant.
Provided that the newsgroup allows elementary questions [my question
was certainly elementary], it is 100% on topic, and you are wrong to
criticise me for my posting.

However, if beginner questions are not allowed here, then, fair enough,
mea culpa, I stand corrected.

Beginner questions are always welcome, though they must be on topic.
The FAQ that I cited defines what is on topic here:

"Only post to comp.lang.c++ if your question is about the C++ language
itself. For example, C++ code design, syntax, style, rules, bugs, etc.
Ultimately this means your question must be answerable by looking into
the C++ language definition as determined by the ISO/ANSI C++ Standard
document, and by planned extensions and adjustments. Operating-specific
questions (e.g., about Windows NT / 95 / 3.x, UNIX, etc.) should go to
an operating-system-specific newsgroup (see below), not to
comp.lang.c++."

As I interpreted it, your post was primarily concerned with an
environmental feature -- namely, the color syntax highlighting of your
particular IDE -- and that is off-topic here as I understand the FAQ
because syntax highlighting is most often a user configurable feature.
Of course there's some gray area, and I think my /post scriptum/
addressed that.

Cheers! --M
 
M

Mike Wahler

Thank you for your very detailed and useful information. I do
appreciate that.

However, I still maintain that I was 100% on topic. I'll show you why.

Suppose I said "My Dev C++ editor makes the words int, float, do
become bold. However, it doesn't do that with other words such as main
or iostream. Can you explain the essential conceptual difference
between the words in the above list which are made bold, and the words
which aren't?"

Since my query is now a request for explaining the difference between
two sets of c++ words, it is, from an absolutely narrow and pure
perspective, a c++ language question. This is because, in the above
quote, the fact that I spotted the difference in a dev c++ context is
purely an introduction to the real c++ question.

So I've proved that my new modified quotation is definitely on topic.

However, the above modified quotation is an extremely close paraphrase
of the posting that was unfairly attacked. (It was mlimber who was
unfair. I have no problem at all with Mike Wahler. In fact you've
been extremely generous and helpful.)

So, since the new modified quotation is on topic, my original posting
is also on topic.

I couldn't possibly have talked about "keywords" and "reserved words"
in my original posting (as you suggest) because I didn't know those two
phrases. If I was familiar with the concept, "reserved word", I would
have googled it and found out that way.

I respectfully suggest that you become less obsessed with
'being right'. :) I believe you've got your answer, and
despite your disagreement with 'mlimber', I doubt you're
bleeding or sporting any bruises (except perhaps to your
ego :))

Let's move on, OK? :)

-Mike

P.S. While I suppose it's a good thing that your editor did
cause you to ask a language question, I'll warn you not to
use such (or a compiler for that matter) as the source of
any definitive answers about the language. Not all of these
tools get everything right every time.
 
K

Kai-Uwe Bux

Thank you for your very detailed and useful information. I do
appreciate that.

However, I still maintain that I was 100% on topic. I'll show you why.

Suppose I said "My Dev C++ editor makes the words int, float, do
become bold. However, it doesn't do that with other words such as main
or iostream. Can you explain the essential conceptual difference
between the words in the above list which are made bold, and the words
which aren't?"

Since my query is now a request for explaining the difference between
two sets of c++ words, it is, from an absolutely narrow and pure
perspective, a c++ language question. This is because, in the above
quote, the fact that I spotted the difference in a dev c++ context is
purely an introduction to the real c++ question.
Yes.

So I've proved that my new modified quotation is definitely on topic.
Correct.

However, the above modified quotation is an extremely close paraphrase
of the posting that was unfairly attacked.

Not so. Your original posting started with this sentence setting the topic:

|| > Could anyone explain the rule the Dev C++ compiler uses for deciding
|| > whether to convert a display of a word to bold font?

And then you provided some examples. However, from the original wording it
is pretty clear that your question is about the behavior of Dev C++; and to
answer your original question one would need to know Dev C++.

(It was mlimber who was unfair. I have no problem at all with Mike
Wahler. In fact you've been extremely generous and helpful.)

So, since the new modified quotation is on topic, my original posting
is also on topic.

That does not follow. All that follows is that you could have posted
something topical instead of your original posting.

[snip]


Best

Kai-Uwe Bux
 
M

mlimber

mlimber said:
Well, the "PS" part of your answer leads to the c++ distinction between
reserved and non-reserved words. And it also points out that some
words which have distinct meanings like "main" etc. are nevertheless
not reserved.

The above two facts are facts about "the c++ language" however narrowly
you define the phrase.

By analogy, suppose someone says "I didn't understand ... in ...book on
c++". Are you then going to attack that person because this newsgroup
is only about the c++ language and not about c++ books?

I humbly apologize if you took my response as an "attack." It was not
intended as such, and I hope you'll take it in the spirit in which it
was meant.
Provided that the newsgroup allows elementary questions [my question
was certainly elementary], it is 100% on topic, and you are wrong to
criticise me for my posting.

However, if beginner questions are not allowed here, then, fair enough,
mea culpa, I stand corrected.

Beginner questions are always welcome, though they must be on topic.
The FAQ that I cited defines what is on topic here:

"Only post to comp.lang.c++ if your question is about the C++ language
itself. For example, C++ code design, syntax, style, rules, bugs, etc.
Ultimately this means your question must be answerable by looking into
the C++ language definition as determined by the ISO/ANSI C++ Standard
document, and by planned extensions and adjustments. Operating-specific
questions (e.g., about Windows NT / 95 / 3.x, UNIX, etc.) should go to
an operating-system-specific newsgroup (see below), not to
comp.lang.c++."

As I interpreted it, your post was primarily concerned with an
environmental feature -- namely, the color syntax highlighting of your
particular IDE -- and that is off-topic here as I understand the FAQ
because syntax highlighting is most often a user configurable feature.
Of course there's some gray area, and I think my /post scriptum/
addressed that.

Cheers! --M

FYI, I sent this post circa 5 PM. Not sure why it was delayed.

Cheers! --M
 
P

pauldepstein

Well, the subject of who is "off-topic" is decided by the newsgroup
community.

So, I do now accept that the replies to my postings show that I am
off-topic by these community standards.

I'm sorry if my criticism of mlimber was unfair.

O.k. I'll move on (re Mike Wahler's comment). Maybe I was
oversensitive. I look forward to posting interesting questions as I
learn more about the language.

Paul Epstein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top