Dev c++ bold convention

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pauldepstein@att.net

    Dev c++ bold convention

    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

  • mlimber

    #2
    Re: Dev c++ bold convention

    pauldepstein@at t.net wrote:[color=blue]
    > 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[/color]

    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:



    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.

    Comment

    • pauldepstein@att.net

      #3
      Re: Dev c++ bold convention

      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

      Comment

      • Mike Wahler

        #4
        Re: [OT] Dev c++ bold convention

        <pauldepstein@a tt.net> wrote in message
        news:1129549186 .768920.185550@ g47g2000cwa.goo glegroups.com.. .[color=blue]
        > Could anyone explain the rule the Dev C++ compiler[/color]

        It's not the compiler doing that, but your editor.
        Not the same thing.
        [color=blue]
        > 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++".[/color]

        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'.
        [color=blue]
        >
        > 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.[/color]

        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?
        [color=blue]
        > Surely, such words do have
        > assigned meanings.[/color]

        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++ :


        -Mike


        Comment

        • Mike Wahler

          #5
          Re: Dev c++ bold convention

          <pauldepstein@a tt.net> wrote in message
          news:1129582456 .752709.201180@ o13g2000cwo.goo glegroups.com.. .[color=blue]
          > 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.[/color]

          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.

          [color=blue]
          >
          > However, if beginner questions are not allowed here,[/color]

          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'. :-)

          [color=blue]
          > then, fair enough,
          > mea culpa, I stand corrected.[/color]

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

          -Mike


          Comment

          • pauldepstein@att.net

            #6
            Re: Dev c++ bold convention

            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

            Comment

            • mlimber

              #7
              Re: Dev c++ bold convention

              pauldepst...@at t.net wrote:[color=blue]
              > 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?[/color]

              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.
              [color=blue]
              > 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.[/color]

              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

              Comment

              • Mike Wahler

                #8
                Re: Dev c++ bold convention


                <pauldepstein@a tt.net> wrote in message
                news:1129585859 .228425.297810@ g47g2000cwa.goo glegroups.com.. .[color=blue]
                > 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.[/color]

                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.



                Comment

                • Kai-Uwe Bux

                  #9
                  Re: Dev c++ bold convention

                  pauldepstein@at t.net wrote:
                  [color=blue]
                  > 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.[/color]

                  Yes.
                  [color=blue]
                  > So I've proved that my new modified quotation is definitely on topic.[/color]

                  Correct.
                  [color=blue]
                  > However, the above modified quotation is an extremely close paraphrase
                  > of the posting that was unfairly attacked.[/color]

                  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++.

                  [color=blue]
                  > (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.[/color]

                  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

                  Comment

                  • mlimber

                    #10
                    Re: Dev c++ bold convention

                    mlimber wrote:[color=blue]
                    > pauldepst...@at t.net wrote:[color=green]
                    > > 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?[/color]
                    >
                    > 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.
                    >[color=green]
                    > > 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.[/color]
                    >
                    > 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[/color]

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

                    Cheers! --M

                    Comment

                    • Mike Wahler

                      #11
                      Re: Dev c++ bold convention

                      "mlimber" <mlimber@gmail. com> wrote in message
                      news:1129587375 .552526.273780@ g43g2000cwa.goo glegroups.com.. .[color=blue]
                      >
                      > FYI, I sent this post circa 5 PM. Not sure why it was delayed.[/color]

                      5 p.m. on which planet?

                      BTW you're OT. :-) :-) :-)

                      -Mike



                      Comment

                      • mlimber

                        #12
                        Re: [OT] Dev c++ bold convention

                        Mike Wahler wrote:[color=blue]
                        > "mlimber" <mlimber@gmail. com> wrote in message
                        > news:1129587375 .552526.273780@ g43g2000cwa.goo glegroups.com.. .[color=green]
                        > >
                        > > FYI, I sent this post circa 5 PM. Not sure why it was delayed.[/color]
                        >
                        > 5 p.m. on which planet?[/color]

                        5 PM EST, an hour earlier than it actually appeared.
                        [color=blue]
                        > BTW you're OT. :-) :-) :-)[/color]

                        You are correct, and I've adjusted the subject accordingly!

                        Cheers! --M

                        Comment

                        • pauldepstein@att.net

                          #13
                          Re: Dev c++ bold convention

                          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

                          Comment

                          Working...