Is it standard and practical to use long long types?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jacob navia

    #76
    Re: Is it standard and practical to use long long types?

    > Error test.c: 3 redeclaration of 'fileno' previously declared at
    h:\lcc\include[color=blue]
    > \stdio.h 149[/color]

    fileno returns the integer value (the file number) of a FILE
    structure.

    If I had a team of people working in lcc-win32 (as gcc has)
    and a huge budget (as MSVC has) I would fix this and other
    warnings, looking at each function to see which is declared
    in the standard and which not.

    jacob


    Comment

    • Irrwahn Grausewitz

      #77
      Re: Is it standard and practical to use long long types?

      "Ioannis Vranos" <ivr@otenet.g r> wrote:[color=blue]
      >"Irrwahn Grausewitz" <irrwahn33@free net.de> wrote in message
      >news:bqgt70ldr bre9t7pdn7cj01q spp098h9ju@4ax. com...[/color]
      <snip>[color=blue][color=green]
      >> However, the art of successfully
      >> communicating with Dan includes the ability to listen to what he
      >> has to say, while blissfully ignoring the way he presents it.
      >> His exaggerations can actually be very amusing, if you avoid to
      >> make the mistake of taking it personally.[/color][/color]
      <snip>[color=blue]
      >Perhaps someone will write a Dan Pop to rest human speech translator, it
      >can't be that difficult. One simple app where one will input Dan Pop
      >sentences, and read the output. Like something that will replace "B*****IT"
      >with "Yes, but".
      >
      >Well if i have some free time this weekend i will make a GUI Dan Pop
      >translator in .NET and make it available for download somewhere. :-)[/color]

      Nice, I'll port it to a standard C command line version, if I get
      your permission. :-) BTW, some more things that need replacement,
      from the top of my head:

      engage your brain
      think harder
      patent idiot
      resident idiot
      idiotic statement
      ...

      Regards
      --
      Irrwahn Grausewitz (irrwahn33@free net.de)
      welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
      clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
      clc OT guide : http://benpfaff.org/writings/clc/off-topic.html

      Comment

      • James Kuyper

        #78
        Re: Is it standard and practical to use long long types?

        "jacob navia" <jacob@jacob.re mcomp.fr> wrote in message news:<c5kgf2$kt c$1@news-reader1.wanadoo .fr>...[color=blue]
        > lcc-win32 implements most of C99.[/color]
        ....[color=blue]
        > I am not as orthodox as you would like,
        > and I dare to believe that C is not a dead
        > language and can be improved.[/color]

        Dan's claim was that lcc-win32 doesn't come close to having a fully
        C99-conformant mode. I know nothing about lcc-win32, so I have no idea
        whether or not he's right. However, it's not a claim that justifies
        your response. A fully conforming mode is not incompatible with a live
        language; the live language could be the lcc default, with the
        fully-conforming mode being an option. Furthermore, even the fully
        conforming mode can have a great many non-standard features, as long
        as those features are provided as extensions that can only be invoked
        by code that has undefined behaviour as far as the standard is
        concerned.

        Comment

        • Ioannis Vranos

          #79
          Re: Is it standard and practical to use long long types?

          "Irrwahn Grausewitz" <irrwahn33@free net.de> wrote in message
          news:1amt701civ ik2el5c4jkr1jfv gg5dutk4e@4ax.c om...[color=blue]
          > "Ioannis Vranos" <ivr@otenet.g r> wrote:[color=green]
          > >"Irrwahn Grausewitz" <irrwahn33@free net.de> wrote in message
          > >news:bqgt70ldr bre9t7pdn7cj01q spp098h9ju@4ax. com...[/color]
          > <snip>[color=green][color=darkred]
          > >> However, the art of successfully
          > >> communicating with Dan includes the ability to listen to what he
          > >> has to say, while blissfully ignoring the way he presents it.
          > >> His exaggerations can actually be very amusing, if you avoid to
          > >> make the mistake of taking it personally.[/color][/color]
          > <snip>[color=green]
          > >Perhaps someone will write a Dan Pop to rest human speech translator, it
          > >can't be that difficult. One simple app where one will input Dan Pop
          > >sentences, and read the output. Like something that will replace[/color][/color]
          "B*****IT"[color=blue][color=green]
          > >with "Yes, but".
          > >
          > >Well if i have some free time this weekend i will make a GUI Dan Pop
          > >translator in .NET and make it available for download somewhere. :-)[/color]
          >
          > Nice, I'll port it to a standard C command line version, if I get
          > your permission.[/color]


          I 'll make also a command-line tgnu/linux port since i don't know X-Windows
          programming (QT mainly). The software will be available under the GNU
          license and i am thinking it will have an update option to download
          dictionary updates from the net. :-)


          :-) BTW, some more things that need replacement,[color=blue]
          > from the top of my head:
          >
          > engage your brain
          > think harder
          > patent idiot
          > resident idiot
          > idiotic statement[/color]


          :-))) Think better, "", Be more careful, Why don't you understand?, careless
          statement are possible translations.


          Also the program will be two way, it will be able to convert normal language
          to DP language so as to help DP thinking and reply faster.






          Regards,

          Ioannis Vranos

          Comment

          • Thomas Stegen

            #80
            Re: Is it standard and practical to use long long types?

            Ioannis Vranos wrote:

            [snip]

            Yeah, because the conversation you two are engaging in
            is of course not rude.

            --
            Thomas.

            Comment

            • Irrwahn Grausewitz

              #81
              [OT] Re: Is it standard and practical to use long long types?

              "Ioannis Vranos" <ivr@otenet.g r> wrote:[color=blue]
              >"Irrwahn Grausewitz" <irrwahn33@free net.de> wrote:[color=green]
              >> "Ioannis Vranos" <ivr@otenet.g r> wrote:[/color][/color]
              <snip>[color=blue][color=green][color=darkred]
              >> >Well if i have some free time this weekend i will make a GUI Dan Pop
              >> >translator in .NET and make it available for download somewhere. :-)[/color][/color][/color]
              [color=blue]
              >I 'll make also a command-line tgnu/linux port since i don't know X-Windows
              >programming (QT mainly). The software will be available under the GNU
              >license and i am thinking it will have an update option to download
              >dictionary updates from the net. :-)[/color]

              I wonder if one could implement a Bayesian filter and scan the
              archives. :o)
              [color=blue][color=green]
              >> :-) BTW, some more things that need replacement,
              >> from the top of my head:
              >>
              >> engage your brain
              >> think harder
              >> patent idiot
              >> resident idiot
              >> idiotic statement[/color]
              >
              >:-))) Think better, "", Be more careful, Why don't you understand?, careless
              >statement are possible translations.[/color]

              Actually, the Popism "resident idiot", when used in c.l.c, usually
              refers to poor chap Marc McIntyre, but simple replacement might lead
              to mildly tautological statements like "Marc McIntyre is our Marc
              McIntyre."; "respected fellow poster" might fit better, then.
              [color=blue]
              >Also the program will be two way, it will be able to convert normal language
              >to DP language so as to help DP thinking and reply faster.[/color]

              Oh, unlimited possibilities.. . :^]

              Regards
              --
              Irrwahn Grausewitz (irrwahn33@free net.de)
              welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
              clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
              clc OT guide : http://benpfaff.org/writings/clc/off-topic.html

              Comment

              • Ioannis Vranos

                #82
                Re: Is it standard and practical to use long long types?

                "jacob navia" <jacob@jacob.re mcomp.fr> wrote in message
                news:c5mn40$8ef $1@news-reader3.wanadoo .fr...[color=blue]
                >
                > I HAD this warning, but in a discussion in this SAME GROUP in which YOU
                > also participated I was pointed to the C99 standard that defines main as
                > returning zero when no result is specified. I worked a day to implement
                > and test this "feature".[/color]


                If you write a compiler (and not only) you must have the document of the
                standard. Don't you have the standard?



                In C99 if you do not return a value from main(), it is the same as if you
                wrote return 0; . But if your compilers cis in ANSI C90 compliance mode, and
                not C99 then you have to issue a warning.






                Ioannis Vranos

                Comment

                • Ioannis Vranos

                  #83
                  Re: Is it standard and practical to use long long types?

                  "jacob navia" <jacob@jacob.re mcomp.fr> wrote in message
                  news:c5mn9k$ees $1@news-reader5.wanadoo .fr...[color=blue]
                  >[color=green]
                  > > Error test.c: 3 redeclaration of 'fileno' previously declared at[/color]
                  > h:\lcc\include[color=green]
                  > > \stdio.h 149[/color]
                  >
                  > fileno returns the integer value (the file number) of a FILE
                  > structure.
                  >
                  > If I had a team of people working in lcc-win32 (as gcc has)
                  > and a huge budget (as MSVC has) I would fix this and other
                  > warnings, looking at each function to see which is declared
                  > in the standard and which not.[/color]


                  The global variables you are using in the library must not have an ordinary
                  name. The standard tells more on this. Please tell if you have the standard.
                  For C99 it is ISO/IEC 9899:1999 .






                  Ioannis Vranos

                  Comment

                  • Ioannis Vranos

                    #84
                    Re: [OT] Re: Is it standard and practical to use long long types?

                    "Irrwahn Grausewitz" <irrwahn33@free net.de> wrote in message
                    news:n5ut705tk8 qb4bjq13dk5e3eh qmvbi5ego@4ax.c om...[color=blue]
                    >
                    > Actually, the Popism "resident idiot", when used in c.l.c, usually
                    > refers to poor chap Marc McIntyre, but simple replacement might lead
                    > to mildly tautological statements like "Marc McIntyre is our Marc
                    > McIntyre."; "respected fellow poster" might fit better, then.[/color]


                    I dropped tonight some lines of code. The dictionary file goes like this:

                    // DP Dictionary file
                    //
                    // Syntax: DP term=Human term

                    engage your brain=think
                    idiot=careless
                    idiotic=erroneu s
                    bullshit=wrong


                    -----------


                    And the main engine so far (at the very beginning):


                    Available under the GNU GPL

                    // The main engine of DP written in ISO C++ 98

                    #include <fstream>
                    #include <string>
                    #include <cctype>

                    class DictionaryFileE xception
                    {
                    };

                    class dictionaryFile
                    {
                    std::ifstream dicFile;
                    std::string dicFileName;

                    public:
                    dictionaryFile( const std::string &filePath) throw (DictionaryFile Exception)
                    {
                    dicFileName=fil ePath;
                    dicFile.open(fi lePath.c_str()) ;

                    if(dicFile.fail ())
                    throw DictionaryFileE xception();

                    FileValidation( );
                    }

                    void FileValidation( ) throw (DictionaryFile Exception)
                    {
                    using namespace std;

                    char input[2];

                    do
                    {
                    dicFile.get(inp ut,2);

                    if(isspace(inpu t[0]) or (input[0]=='\\' and input[1]=='\\'))
                    continue;

                    else if(!isalpha(inp ut[0]) and !isdigit(input[0]))
                    throw DictionaryFileE xception();

                    }while(!dicFile .eof());
                    }
                    };






                    Ioannis Vranos

                    Comment

                    • CBFalconer

                      #85
                      Re: Is it standard and practical to use long long types?

                      Ioannis Vranos wrote:[color=blue]
                      >[/color]
                      .... snip ...[color=blue]
                      >
                      > If you write a compiler (and not only) you must have the document
                      > of the standard. Don't you have the standard?
                      >
                      > In C99 if you do not return a value from main(), it is the same as
                      > if you wrote return 0; . But if your compilers cis in ANSI C90
                      > compliance mode, and not C99 then you have to issue a warning.[/color]

                      No you don't. It's a QOI matter, not a standards matter.

                      FUPs set.

                      --
                      fix (vb.): 1. to paper over, obscure, hide from public view; 2.
                      to work around, in a way that produces unintended consequences
                      that are worse than the original problem. Usage: "Windows ME
                      fixes many of the shortcomings of Windows 98 SE". - Hutchison


                      Comment

                      • Irrwahn Grausewitz

                        #86
                        Re: [OT] Re: Is it standard and practical to use long long types?

                        "Ioannis Vranos" <ivr@guesswh.at .emails.ru> wrote:
                        <snip>[color=blue]
                        >I dropped tonight some lines of code. The dictionary file goes like this:
                        >
                        >// DP Dictionary file
                        >//
                        >// Syntax: DP term=Human term[/color]
                        <snip>
                        [color=blue]
                        >And the main engine so far (at the very beginning):
                        >
                        >Available under the GNU GPL
                        >
                        >// The main engine of DP written in ISO C++ 98[/color]
                        <snip>

                        Sigh. Seems I have to learn C++ _seriously_ in the end, then;
                        somehow managed to get away without doing it, up until now. ;-)

                        Regards
                        --
                        Irrwahn Grausewitz (irrwahn33@free net.de)
                        welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
                        clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
                        clc OT guide : http://benpfaff.org/writings/clc/off-topic.html

                        Comment

                        • Dan Pop

                          #87
                          Re: Is it standard and practical to use long long types?

                          In <c5mn40$8ef$1@n ews-reader3.wanadoo .fr> "jacob navia" <jacob@jacob.re mcomp.fr> writes:

                          [color=blue]
                          >"Dan Pop" <Dan.Pop@cern.c h> a écrit dans le message de
                          >news:c5m02f$5e 2$1@sunnews.cer n.ch...[color=green]
                          >> In <c5kgf2$ktc$1@n ews-reader1.wanadoo .fr> "jacob navia"[/color]
                          ><jacob@jacob.r emcomp.fr> writes:[color=green]
                          >>
                          >>
                          >> 2. main() is defined as returning int, but it doesn't return anything at
                          >> all. Methinks a warning is badly needed.[/color]
                          >
                          >I HAD this warning, but in a discussion in this SAME GROUP in which YOU
                          >also participated I was pointed to the C99 standard that defines main as[/color]

                          Do you remember MY contribution to that discussion? I was strongly
                          arguing that your compiler was doing the RIGHT thing. You chose to ignore
                          my advice and now you're making ME responsible for that?!?

                          Dan
                          --
                          Dan Pop
                          DESY Zeuthen, RZ group
                          Email: Dan.Pop@ifh.de

                          Comment

                          • Dan Pop

                            #88
                            Re: Is it standard and practical to use long long types?

                            In <c5mn9k$ees$1@n ews-reader5.wanadoo .fr> "jacob navia" <jacob@jacob.re mcomp.fr> writes:
                            [color=blue][color=green]
                            >> Error test.c: 3 redeclaration of 'fileno' previously declared at[/color]
                            >h:\lcc\inclu de[color=green]
                            >> \stdio.h 149[/color]
                            >
                            >fileno returns the integer value (the file number) of a FILE structure.[/color]

                            I know. I also know that it is not a standard C library feature.
                            I didn't put this particular identifier in my test program by pure
                            chance ;-)
                            [color=blue]
                            >If I had a team of people working in lcc-win32 (as gcc has)
                            >and a huge budget (as MSVC has) I would fix this and other
                            >warnings, looking at each function to see which is declared
                            >in the standard and which not.[/color]

                            This is, of course, bullshit: identifying the nonstandard identifiers
                            in a standard header is a piece of cake for any serious implementor
                            (use grep, when in doubt) and grouping them together under the
                            protection of an #ifdef is even easier. Note that this is only needed
                            for identifiers from the program name space, you can leave the ones
                            in the implementation name space unprotected and no one will have
                            any business to complain.

                            Make your project open source and I'm sure you'll find people willing to
                            help improving it.

                            Dan
                            --
                            Dan Pop
                            DESY Zeuthen, RZ group
                            Email: Dan.Pop@ifh.de

                            Comment

                            • jacob navia

                              #89
                              Re: Is it standard and practical to use long long types?


                              ----- Original Message -----
                              From: "Dan Pop" <Dan.Pop@cern.c h>
                              Newsgroups: comp.lang.c,com p.lang.c++
                              Sent: Friday, April 16, 2004 1:59 PM
                              Subject: Re: Is it standard and practical to use long long types?

                              [color=blue]
                              > In <c5mn40$8ef$1@n ews-reader3.wanadoo .fr> "jacob navia"[/color]
                              <jacob@jacob.re mcomp.fr> writes:[color=blue]
                              >
                              >
                              > Do you remember MY contribution to that discussion? I was strongly
                              > arguing that your compiler was doing the RIGHT thing. You chose to ignore
                              > my advice and now you're making ME responsible for that?!?
                              >[/color]

                              Wait Dan, I saw that sentence in the standard, and I wrote
                              in this group that you were right.

                              But I have to follow the standard.

                              As you, I do *not* agree with this stuff for main, but I should
                              do as specified anyway.

                              I have tried to keep all extensions compatible with the
                              standard and make C99 the base of the language lcc-win32
                              supports.

                              jacob


                              Comment

                              Working...