The_Sage & void main()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David B. Held

    #76
    Re: The_Sage & void main()

    "Noah Roberts" <nroberts@donte mailme.com> wrote in message
    news:bl5cic$6p$ 2@quark.scn.rai n.com...[color=blue]
    > [...]
    > An interesting aside I just thought of: If the rest of main's signature
    > is implementation defined, I wonder what the standard has to say
    > on this one:
    >
    > int main(stuff) const;[/color]

    I think it still has to conform to the rest of the C++ rules. Since main()
    isn't a member function, this signature doesn't even make sense. I
    mean, what would this signature mean:

    friend virtual static volatile int main(...) const = 0; // ???

    Dave


    Comment

    • WW

      #77
      Re: The_Sage &amp; void main()

      David B. Held wrote:[color=blue]
      > I mean, what would this signature mean:
      >
      > friend virtual static volatile int main(...) const = 0; // ???[/color]

      Hm, I think it would mean: The Sage posted again.

      --
      WW aka Attila


      Comment

      • Greg Comeau

        #78
        Re: The_Sage &amp; void main()

        In article <bl7cnv$cjh$1@n ews.astound.net >,
        David B. Held <dheld@codelogi cconsulting.com > wrote:[color=blue]
        >"Noah Roberts" <nroberts@donte mailme.com> wrote in message
        >news:bl5cic$6p $2@quark.scn.ra in.com...[color=green]
        >> [...]
        >> An interesting aside I just thought of: If the rest of main's signature
        >> is implementation defined, I wonder what the standard has to say
        >> on this one:
        >>
        >> int main(stuff) const;[/color]
        >
        >I think it still has to conform to the rest of the C++ rules. Since main()
        >isn't a member function, this signature doesn't even make sense. I
        >mean, what would this signature mean:
        >
        >friend virtual static volatile int main(...) const = 0; // ???[/color]

        I'm fairly certain is has to be otherwise well-formed.
        --
        Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
        Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
        World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
        Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

        Comment

        • Mike Wahler

          #79
          Re: [OT] The_Sage &amp; void main()

          "SomeDumbGu y" <abuse@127.0.0. 1> wrote in message
          news:lPEdb.2387 2$ZR1.528@nwrdd c01.gnilink.net ...[color=blue]
          > Chris Johnson wrote:
          >[color=green][color=darkred]
          > >>Was that needed?[/color]
          > >
          > > Excuse me now while I go lower the score on this thread as simply
          > > plonking the trolls is not enough to keep this from showing up
          > > in my news reader.[/color]
          >
          > You are correct.
          > I should have remembered that my name was to keep myself humble, not
          > others. I have failed.
          >
          > Still, it has been implied that I was dumb for asking in the first place.
          > I was always told "The only dumb question is the one that is never asked"
          >
          > I have learned something, even if it came with some baggage.
          > I will go so far as to apologize if my reply was taken as rude.
          > I will also take your advice, and try not to worry about how other
          > people are, as I got the information I asked for.
          > Thank you[/color]

          Thank you for being gracious about this, and I do apologize
          if I've offended you. But did you not see the smiley
          after what I wrote? It indicated (apparently unsuccessfuly)
          that my remark was to be taken as a friendly jibe. But in
          general you are right, sometimes I can be a "smartass."
          I'll work on it. :-)

          -Mike



          Comment

          • The_Sage

            #80
            Re: The_Sage &amp; void main()

            >Reply to article by: "WW" <wolof@freemail .hu>[color=blue]
            >Date written: Sat, 27 Sep 2003 23:45:07 +0300
            >MsgID:<bl4ssi$ 7s7$1@phys-news1.kolumbus. fi>[/color]
            [color=blue]
            >You still did not answer the question! Read and tell what Chapter 28 of the
            >C++ standard says about the main function. If you don't, we will all know
            >you are a clueless idiot - to use your words.[/color]

            Don't change the subject, especially when the issue now is if you can even read
            or not. The sentence in question taken from the standard clearly was talking
            about the return type, not the parameters. If you can't tell the difference
            between a return type and parameter, you have lost all credibility. In other
            words, you are a joke when it comes to discussing anything at all about any
            computer language.

            Why don't you try comp.lang.begin ning.programmin g where you will fit right in?

            Once again, the sentence in question that is clearly and obviously speaking
            about the RETURN TYPE (see if you can catch it this time 'round)...

            3.6.1 Main function paragraph 2:
            "It shall have a return type of type int
            -->BUT<--
            otherwise its type is implementation-defined"

            The Sage

            =============== =============== =============== =============== =
            My Home Page : http://members.cox.net/the.sage

            "The men that American people admire most extravagantly are
            most daring liars; the men they detest the most violently are
            those who try to tell them the truth" -- H. L. Mencken
            =============== =============== =============== =============== =

            Comment

            • The_Sage

              #81
              Re: The_Sage &amp; void main()

              >Reply to article by: "Kwan Ting" <me@here.com>[color=blue]
              >Date written: Sat, 27 Sep 2003 22:29:56 +0100
              >MsgID:<qYndb.7 94$Wi.524@newsf ep3-gui.server.ntli .net>[/color]
              [color=blue][color=green]
              >>I see you don't know how to use a word search. Heck, even the title tells you
              >>that they are talking about C and C++, ie -- "VOID MAIN() IS NOT LEGAL IN C++
              >>BUT IS LEGAL IN C". Funny how you missed that. Then they listed all the C and[/color][/color]
              [color=blue]
              >No, the real funny thing is how you can't read what yourself is posting!
              >Now, which bit of "VOID MAIN() IS NOT LEGAL IN C++" don't you understand ???[/color]

              We aren't reading anything taken from the ISO standard at that link, are we?

              No, we are not.

              So it doesn't matter what it says in regard to what is "legal" or not.

              DUH!

              I know this is probably going to be way over your simple-mind head to understand
              this time 'round again, but the point was that it listed for me, all the
              compilers that use void main(). That way there could be no doubt which C++
              compilers use void main().

              That was the point...get it this time? The point wasn't what they claimed on
              their site without any facts to back it up with, the point was which compilers
              used void main(). Duh! And the only reason I used that link to begin with is
              because someone said that not one major C++ compiler used void main(). I proved
              them wrong.

              The Sage

              =============== =============== =============== =============== =
              My Home Page : http://members.cox.net/the.sage

              "The men that American people admire most extravagantly are
              most daring liars; the men they detest the most violently are
              those who try to tell them the truth" -- H. L. Mencken
              =============== =============== =============== =============== =

              Comment

              • The_Sage

                #82
                Re: The_Sage &amp; void main()

                >Reply to article by: comeau@panix.co m (Greg Comeau)[color=blue]
                >Date written: 27 Sep 2003 20:09:04 -0400
                >MsgID:<bl58r0$ e1n$1@panix1.pa nix.com>[/color]
                [color=blue][color=green]
                >>.... listed all the C and
                >>C++ compilers that used void main() in BOTH C and C++. In fact, if you could
                >>learn to click on the link they gave to Microsoft, you would see where
                >>Microsofts online documenation for their C++ compiler uses void main().[/color][/color]
                [color=blue]
                >Yes, but the problem is that you have to also define the
                >context of such uses, as I clearly explained in another message.
                >For instance, with Comeau C++, if I have:[/color]
                [color=blue]
                >//voidmain.cpp, this is supposed to be Standard C++ code
                >void main()
                >{
                >}[/color]

                No, that is your belief, not what the standard states. You aren't the standard
                so it doesn't matter what you believe.

                I like void main() and I hope all the major compiler manufacturers continue to
                provide it for their customers like me. Like I pointed out to poor little David,
                there is no point in returning anything from main() since once you exit main(),
                that's it -- there is nothing to read your int.

                The Sage

                =============== =============== =============== =============== =
                My Home Page : http://members.cox.net/the.sage

                "The men that American people admire most extravagantly are
                most daring liars; the men they detest the most violently are
                those who try to tell them the truth" -- H. L. Mencken
                =============== =============== =============== =============== =

                Comment

                • The_Sage

                  #83
                  Re: The_Sage &amp; void main()

                  >Reply to article by: Noah Roberts <nroberts@donte mailme.com>[color=blue]
                  >Date written: Sat, 27 Sep 2003 18:15:11 -0700
                  >MsgID:<bl5cs2$ 1ra$1@quark.scn .rain.com>[/color]
                  [color=blue][color=green][color=darkred]
                  >>>>No, they were talking about both. Do a word search.[/color][/color][/color]
                  [color=blue][color=green][color=darkred]
                  >>>A word search does not work, you must *read* the site.[/color][/color][/color]
                  [color=blue][color=green]
                  >>I see you don't know how to use a word search. Heck, even the title tells you
                  >>that they are talking about C and C++, ie -- "VOID MAIN() IS NOT LEGAL IN C++
                  >>BUT IS LEGAL IN C". Funny how you missed that. Then they listed all the C and
                  >>C++ compilers that used void main() in BOTH C and C++. In fact, if you could
                  >>learn to click on the link they gave to Microsoft, you would see where
                  >>Microsofts online documenation for their C++ compiler uses void main().[/color][/color]
                  [color=blue]
                  >This guy has to be pulling our legs. Noone that is as ignorant as ^that
                  >could survive outside of a lab environment. He's trolling and we all
                  >fell for it. It has been fun, but I am done :P[/color]

                  Ah, somebody else who can't read simple english, and can't tell the link in
                  question is NOT a link to the ISO standard, nor is it an authority on the ISO
                  standard. It was just a link to show that other C++ compilers use void main(),
                  not as proof whether void main() was "legal" or not. For that proof, I defer you
                  to the ISO standard instead of a personal web page. Capice?

                  The Sage

                  =============== =============== =============== =============== =
                  My Home Page : http://members.cox.net/the.sage

                  "The men that American people admire most extravagantly are
                  most daring liars; the men they detest the most violently are
                  those who try to tell them the truth" -- H. L. Mencken
                  =============== =============== =============== =============== =

                  Comment

                  • Noah Roberts

                    #84
                    Re: The_Sage &amp; void main()

                    The_Sage wrote:[color=blue][color=green]
                    >>Reply to article by: Noah Roberts <nroberts@donte mailme.com>[/color][/color]
                    [color=blue][color=green]
                    >>This guy has to be pulling our legs. Noone that is as ignorant as ^that
                    >>could survive outside of a lab environment. He's trolling and we all
                    >>fell for it. It has been fun, but I am done :P[/color]
                    >
                    >
                    > Ah, somebody else who can't read simple english, and can't tell the link in
                    > question is NOT a link to the ISO standard, nor is it an authority on the ISO
                    > standard. It was just a link to show that other C++ compilers use void main(),
                    > not as proof whether void main() was "legal" or not. For that proof, I defer you
                    > to the ISO standard instead of a personal web page. Capice?[/color]

                    Now that I have upgraded my newsreader I can finally do this. You will
                    be the first person I have ever done this to on usenet ever.

                    *plonk*

                    bye bye now...
                    NR

                    Comment

                    • Gary Labowitz

                      #85
                      Re: The_Sage &amp; void main()

                      "Greg Comeau" <comeau@panix.c om> wrote in message
                      news:bl7eaf$7fj $1@panix2.panix .com...[color=blue]
                      > In article <bl7cnv$cjh$1@n ews.astound.net >,
                      > David B. Held <dheld@codelogi cconsulting.com > wrote:[color=green]
                      > >"Noah Roberts" <nroberts@donte mailme.com> wrote in message[/color][/color]
                      et.al.
                      I just got back from checking the.sage web site. Oy. It is such a jumble of
                      illogic and misinformed opinion that it is worthless except as a bad example
                      to lead the unknowledgeable astray. It is one giant troll. Except I think he
                      means it. He is a true believer, gang, and as such, cannot be convinced of
                      anything except what he believes.
                      It is clear that he doesn't know C++, philosophy, theology, and logic. He
                      knows enough cosmology to be dangerous.
                      Might as well give it up. I do.
                      --
                      Gary


                      Comment

                      • Randall Hyde

                        #86
                        Re: The_Sage &amp; void main()


                        "The_Sage" <theeSage@azrmc i.net> wrote in message news:qc3fnv4ptt 0jm8a1gb89ckjnq g1ikpcolg@4ax.c om...[color=blue]
                        >
                        > Don't change the subject, especially when the issue now is if you can even read
                        > or not. The sentence in question taken from the standard clearly was talking
                        > about the return type, not the parameters. If you can't tell the difference
                        > between a return type and parameter, you have lost all credibility. In other
                        > words, you are a joke when it comes to discussing anything at all about any
                        > computer language.[/color]

                        Forgive me for butting into this intellectually stimulating debate...
                        But I'm a bit confused here. You keep mentioning the word "parameters ".
                        You are the only one who keeps bringing this term up. I'm just a simpleton,
                        moron, idiot, and I'm certainly ignorant in these matters; I simply don't see
                        what "parameters " has to do with this discussion. Could you please explain
                        what you're talking about? And please give some examples because I'm a
                        little slow and incapable of reading that confusing specification. As best
                        I can tell from the exchanges going on, people *are* talking about the
                        return type, not any "parameters ". So I'd appreciate you explicitly explaining
                        what you mean by parameters because it has left me totally confused.

                        [color=blue]
                        > Once again, the sentence in question that is clearly and obviously speaking
                        > about the RETURN TYPE (see if you can catch it this time 'round)...
                        >
                        > 3.6.1 Main function paragraph 2:
                        > "It shall have a return type of type int
                        > -->BUT<--
                        > otherwise its type is implementation-defined"
                        >
                        > The Sage[/color]

                        See, I just don't know what that has to do with parameters. It never
                        mentions the word. Nor have I noticed anyone else using that word
                        (other than you). So perhaps you could elaborate a bit?
                        Cheers,
                        Randy Hyde


                        Comment

                        • Randall Hyde

                          #87
                          Re: The_Sage &amp; void main()


                          "The_Sage" <theeSage@azrmc i.net> wrote in message news:044fnvohro rgrqm7d1gbe49n4 9jmn1mkqj@4ax.c om...[color=blue]
                          >
                          > I like void main() and I hope all the major compiler manufacturers continue to
                          > provide it for their customers like me. Like I pointed out to poor little David,
                          > there is no point in returning anything from main() since once you exit main(),
                          > that's it -- there is nothing to read your int.[/color]

                          I suspect that there are many Windows, Unix, and Linux programmers who
                          would strongly disagree with your statement. Every one of these operating
                          systems provides the ability to query the program's return value. For example,
                          as a Windows programmer, surely you've come across the ExitProcess API
                          call. Ever wonder what the parameter you pass ExitProcess is for? After all,
                          the program is quitting, why would it want to pass a value there? Ever heard
                          of the GetExitCodeProc ess or GetExitCodeThre ad API functions? I wonder
                          what it is that they are retrieving? And that's just Windows (which you claim
                          to be familiar with). Other OSes provide similar facilities. And guess what?
                          The return value that main returns *is* the "exit code" that these API functions
                          are dealing with. Surely as a hard-core Windows programmer you would
                          understand this. We can probably forgive you for ignorance involving *NIX
                          OSes, but you're the Windows/VC++ king, so you *must* know about
                          Windows' exit codes, right?
                          Cheers,
                          Randy Hyde


                          Comment

                          • Trent WADDINGTON

                            #88
                            Re: The_Sage &amp; void main()

                            In comp.lang.c++ Randall Hyde <randyhyde@eart hlink.net> wrote:
                            [color=blue]
                            > I suspect that there are many Windows, Unix, and Linux programmers who
                            > would strongly disagree with your statement. Every one of these operating
                            > systems provides the ability to query the program's return value.[/color]

                            Of course, you're absolutely right, but then again, ::exit() is in the
                            standard library for a reason.

                            Trent

                            Comment

                            • Randall Hyde

                              #89
                              Re: The_Sage &amp; void main()


                              "Gary Labowitz" <glabowitz@comc ast.net> wrote in message news:BdicnVYMts ciPOqiXTWJhg@co mcast.com...[color=blue]
                              >
                              > I just got back from checking the.sage web site. Oy. It is such a jumble of
                              > illogic and misinformed opinion that it is worthless except as a bad example
                              > to lead the unknowledgeable astray. It is one giant troll. Except I think he
                              > means it. He is a true believer, gang, and as such, cannot be convinced of
                              > anything except what he believes.
                              > It is clear that he doesn't know C++, philosophy, theology, and logic. He
                              > knows enough cosmology to be dangerous.
                              > Might as well give it up. I do.
                              > --
                              > Gary[/color]

                              You do see, know, where he has developed his debating skills and sense
                              of logic, eh? All that practice in *.religion.* has proved quite useful for
                              sharpening his ability to debate logically :-)
                              Cheers,
                              Randy Hyde


                              Comment

                              • Greg Comeau

                                #90
                                Re: The_Sage &amp; void main()

                                In article <HbOdb.8385$NX3 .3315@newsread3 .news.pas.earth link.net>,
                                Randall Hyde <randyhyde@eart hlink.net> wrote:[color=blue]
                                >
                                >"The_Sage" <theeSage@azrmc i.net> wrote in message news:qc3fnv4ptt 0jm8a1gb89ckjnq g1ikpcolg@4ax.c om...[color=green]
                                >>
                                >> Don't change the subject, especially when the issue now is if you can even read
                                >> or not. The sentence in question taken from the standard clearly was talking
                                >> about the return type, not the parameters. If you can't tell the difference
                                >> between a return type and parameter, you have lost all credibility. In other
                                >> words, you are a joke when it comes to discussing anything at all about any
                                >> computer language.[/color]
                                >
                                >Forgive me for butting into this intellectually stimulating debate...
                                >But I'm a bit confused here. You keep mentioning the word "parameters ".
                                >You are the only one who keeps bringing this term up. I'm just a simpleton,
                                >moron, idiot, and I'm certainly ignorant in these matters; I simply don't see
                                >what "parameters " has to do with this discussion. Could you please explain
                                >what you're talking about? And please give some examples because I'm a
                                >little slow and incapable of reading that confusing specification. As best
                                >I can tell from the exchanges going on, people *are* talking about the
                                >return type, not any "parameters ". So I'd appreciate you explicitly explaining
                                >what you mean by parameters because it has left me totally confused.
                                >
                                >[color=green]
                                >> Once again, the sentence in question that is clearly and obviously speaking
                                >> about the RETURN TYPE (see if you can catch it this time 'round)...
                                >>
                                >> 3.6.1 Main function paragraph 2:
                                >> "It shall have a return type of type int
                                >> -->BUT<--
                                >> otherwise its type is implementation-defined"
                                >>
                                >> The Sage[/color]
                                >
                                >See, I just don't know what that has to do with parameters. It never
                                >mentions the word. Nor have I noticed anyone else using that word
                                >(other than you). So perhaps you could elaborate a bit?[/color]

                                "its" above is main, so the sentence with substitution is:

                                "main shall have a return type of type int
                                otherwise main's type is implementation-defined"

                                Note that the type of a function involves its parameters' types.
                                Note also that the return type of a function is not its type.
                                --
                                Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
                                Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
                                World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
                                Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

                                Comment

                                Working...