Loading ...
Sorry, an error occurred while loading the content.
 

RE: [libertybasic] But the Help File Says,...""

Expand Messages
  • Stefan Pendl
    ... From the LB4.03 help file under Contents = Language Syntax and Usage = Logic and Structure = Boolean Evaluations Multiple Conditions When
    Message 1 of 28 , Jan 1, 2011
      >
      > Gary,
      >
      > Please provide some code to reproduce this bug. I just
      > tried, but in my testing the following two lines really do
      > seem to be equivalent.
      >
      > if x<3 and y>4 then print "yes"
      > if (x<3) and (y>4) then print "yes"
      >
      > LB v4.04 went through a very long test phase as you know. It
      > would be hard to believe that there are many new bugs
      > introduced in that version.
      >
      > -Carl
      >

      From the LB4.03 help file under "Contents => Language Syntax and Usage => Logic and Structure => Boolean Evaluations"

      <quote>
      Multiple Conditions
      When evaluating multiple conditions, each condition must be placed inside parentheses, as in the examples below.
      </quote>

      And I remember this sentence from back in LB3 too.

      ----

      Stop complaining, but read the help file and test the pre-releases.

      If you don't test the pre-releases, you don't seem to be interested to make the product you use better.

      Carl does only have a limited amount of time and limited test cases, so he can never test every way LB is used.

      ----

      It is always the same, just a week after a new release is published, people start complaining, but those people never reported those
      problems during the beta testing phase.


      ---
      Stefan Pendl
      http://stefanpendl.runbasichosting.com/

      Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
      Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit RTM
      AMD Turion X2 RM-70 2GHz, 4GB RAM
    • Gary Passmore
      Carl, I can t comply with your request, because I don t see any bug there. Stefan says the help file requires parentheses, so you must use them. The author of
      Message 2 of 28 , Jan 1, 2011
        Carl,

        I can't comply with your request, because I don't see any bug there.

        Stefan says the help file requires parentheses, so you must use them.

        The author of Liberty Basic himself has just demonstrated that "it ain't
        necessarily so*.

        I only worry that if I do stuff like that in my programs, the next version will
        reject them. Mia culpa, I suppose ("Ve haf rules!")

        My post was not a complaint (Stefan), merely an observation that "callin' it 'a
        rule' don't make it right, Boss**."

        May you all receive much good fortune in the coming year, as well as those that
        follow.

        References:

        *    George Gershwin, "Porgy and Bess"
        ** "Cool Hand Luke" ('callin' it your job...')

        ...from the world according to GaRPMorE




        ________________________________
        From: Carl Gundel <carlg@...>
        To: libertybasic@yahoogroups.com
        Sent: Sat, January 1, 2011 12:39:44 AM
        Subject: Re: [libertybasic] But the Help File Says,...""

         
        Gary,

        Please provide some code to reproduce this bug. I just tried, but in my testing
        the following two lines really do seem to be equivalent.

        if x<3 and y>4 then print "yes"
        if (x<3) and (y>4) then print "yes"

        LB v4.04 went through a very long test phase as you know. It would be hard to
        believe that there are many new bugs introduced in that version.

        -Carl

        On Dec 31, 2010, at 7:31 PM, Gary Passmore wrote:

        > Yet another instance of stuff that works (or used to work, if it's been
        > "improved" again) in seeming contravention to the help file,
        > and another reason I'm reluctant to "upgrade."
        > LB 4.03, at least, seems to understand that "if x<3 and y>4" has the same sense
        >
        > as "if (x<3) and (y>4).," and why not?
        > There's an old saying, "If it ain't broke, don't fix it." In engineering we
        > figured, if it works, it's good to go.
        > I never take the help file "at its word." I guess it's the born skeptic in me.

        > Isn't it better to know "what it is," than "what it says it is?"
        > ...from the world according to GaRPMorE
        >
        >
        >
        >
        > ________________________________
        > From: Stefan Pendl <pendl2megabit@...>
        > To: libertybasic@yahoogroups.com
        > Sent: Fri, December 31, 2010 3:20:07 PM
        > Subject: RE: [libertybasic] Serial Port Read
        >
        >
        >>>
        >>> Try rearranging it like so:
        >>>
        >>>> while lof(#k3radio) = 0 and tick < timeoutvar
        >>>> tick = tick + 1
        >>>> wend
        >>>> if tick = timeoutvar then goto [errorhandeler]
        >>>
        >>> -Carl Gundel
        >>
        >> Carl,
        >> That is how I usually do it, by accident really. But it
        >> makes me wonder why the other structure causes his "not
        >> understood" error.
        >> regards.
        >>
        >
        > When using binary operators, you need to group the left and right hand side by

        > parenthesis.
        >
        > while (lof(#k3radio) = 0) and (tick < timeoutvar)
        >
        > This is described in the help file.
        >
        >
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >







        [Non-text portions of this message have been removed]
      • Gary Passmore
         Mike, The problem is that I did not make myself clear enough for everyone to understand. The two code lines perform identically, but one of them is not in
        Message 3 of 28 , Jan 1, 2011
           Mike,

          The problem is that I did not make myself clear enough for everyone to
          understand. The two code lines perform identically, but one of them is not in
          accordance with the help file instruction. Where, then is the fault? I maintain
          that the help file should be amended. Certain others hold that code should be in
          strict accordance with the help file, no matter what works. I concede that they
          have a point, but unless it matters in practice, I maintain that that argument
          is moot.
           
          ...from the world according to GaRPMorE


          ________________________________
          From: green8819 <green8819@...>
          To: libertybasic@yahoogroups.com
          Sent: Sat, January 1, 2011 8:34:43 PM
          Subject: [libertybasic] Re: But the Help File Says,...""

          Hi Gary,
          I tested. There is no problem.
          You may have re-assigned your x or y somewhere.
          -Mike





          [Non-text portions of this message have been removed]
        • Stefan Pendl
          ... I think the problem is, that we do not have any clue in which order the conditional operators are evaluated. This leads to the conclusion, that it is best
          Message 4 of 28 , Jan 2, 2011
            >
            >  Mike,
            >
            > The problem is that I did not make myself clear enough for
            > everyone to
            > understand. The two code lines perform identically, but one
            > of them is not in
            > accordance with the help file instruction. Where, then is the
            > fault? I maintain
            > that the help file should be amended. Certain others hold
            > that code should be in
            > strict accordance with the help file, no matter what works. I
            > concede that they
            > have a point, but unless it matters in practice, I maintain
            > that that argument
            > is moot.
            >  
            > ...from the world according to GaRPMorE
            >

            I think the problem is, that we do not have any clue in which order the conditional operators are evaluated.
            This leads to the conclusion, that it is best to use parenthesis to make sure one gets the expected results.

            There is only information in the help file about the order of mathematical operators, but none for conditional operators.

            ----

            The whole debate is about missing information in the help file.
            If a keyword is described as to be used in one way in the help file, than any other way should raise a syntax error.

            Relying on undocumented behavior is not really reliable and allowing anything is not the way either.

            There is no room for having any doubt about how a programming language reacts on code.
            It is no good to be able to make an O into a X.

            If one has a rule set he can always follow, he will faster achieve his goal.


            ---
            Stefan Pendl
            http://stefanpendl.runbasichosting.com/

            Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
            Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

            Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

            Books at http://www.lulu.com/ and http://www.amazon.com/
            Alyce Watson ... APIs for Liberty BASIC
            Carl Gundel .... Beginning Programming with Liberty BASIC

            Windows 7 Home Premium 64-bit RTM
            AMD Turion X2 RM-70 2GHz, 4GB RAM
          • garpmore
            I think this has gone far enough, especially as it seems to be going nowhere. ... Does no one else see the irony? LOL. Cheers, G.P.
            Message 5 of 28 , Jan 2, 2011
              I think this has gone far enough, especially as it seems to be going nowhere.

              In message# 42349, Carl Gundel wrote:

              >> while lof(#k3radio) = 0 and tick < timeoutvar

              In message #42356, Stefan Pendl wrote:

              > When using binary operators, you need to group the left and right hand side by parenthesis.

              > while (lof(#k3radio) = 0) and (tick < timeoutvar)

              > This is described in the help file.


              Does no one else see the irony? LOL. Cheers, G.P.
            • Stefan Pendl
              ... Some questions: Can I contact Carl and get an instant response to a trivial question? Isn t it easier to consult the help file, which is at my hands? Has
              Message 6 of 28 , Jan 2, 2011
                >
                > I think this has gone far enough, especially as it seems to
                > be going nowhere.
                >
                > In message# 42349, Carl Gundel wrote:
                >
                > >> while lof(#k3radio) = 0 and tick < timeoutvar
                >
                > In message #42356, Stefan Pendl wrote:
                >
                > > When using binary operators, you need to group the left
                > and right hand side by parenthesis.
                >
                > > while (lof(#k3radio) = 0) and (tick < timeoutvar)
                >
                > > This is described in the help file.
                >
                >
                > Does no one else see the irony? LOL. Cheers, G.P.
                >

                Some questions:

                Can I contact Carl and get an instant response to a trivial question?
                Isn't it easier to consult the help file, which is at my hands?

                Has anyone found a table about relational operator precedence in the help file?
                Isn't it saver to code in a predictable way?

                Do I really have to create a test case to find out the relational operator precedence?
                Isn't it easier to have this included in the help file as it is for mathematical operators?


                ---
                Stefan Pendl
                http://stefanpendl.runbasichosting.com/

                Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
                Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

                Books at http://www.lulu.com/ and http://www.amazon.com/
                Alyce Watson ... APIs for Liberty BASIC
                Carl Gundel .... Beginning Programming with Liberty BASIC

                Windows 7 Home Premium 64-bit RTM
                AMD Turion X2 RM-70 2GHz, 4GB RAM
              • Patric t'Kindt
                My program to read values with the serial port (with ntport.dll and zntport.sys) does not work in W7 64 bit. Is this normal and can it be solved? The program
                Message 7 of 28 , Feb 9, 2011
                  My program to read values with the serial port (with ntport.dll and zntport.sys)
                  does not work in W7 64 bit. Is this normal and can it be solved?

                  The program starts with:
                  open "com4:9600,n,8,1" for random as #commHandle
                  Port = hexdec("2EC")
                  and always worked well in W98 and W XP.

                  Thank you! (almost)




                  [Non-text portions of this message have been removed]
                • Sam
                  I believe ntport and zntport are for parallel port access only, and for that purpose the ancient versions that come with LB are a disaster, so do not use them
                  Message 8 of 28 , Feb 9, 2011
                    I believe ntport and zntport are for parallel port access only, and for that purpose the ancient versions that come with LB are a disaster, so do not use them under any circumstances.

                    If you actually have parallel port accesses (INP() and OUT) in addition to serial port accesses, those DLLs may be the problem, since they seem to trash part of LB's memory. If you don't access the parallel port, I'm not sure what the problem is.

                    Sam W.

                    --- In libertybasic@yahoogroups.com, Patric t'Kindt <tkpatric@...> wrote:
                    >
                    >
                    >
                    > My program to read values with the serial port (with ntport.dll and zntport.sys)
                    > does not work in W7 64 bit. Is this normal and can it be solved?
                    >
                    > The program starts with:
                    > open "com4:9600,n,8,1" for random as #commHandle
                    > Port = hexdec("2EC")
                    > and always worked well in W98 and W XP.
                    >
                    > Thank you! (almost)
                    >
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                  • Stefan Pendl
                    ... The ntport DLLs are only needed by the INP and OUT commands as already stated, they do not involve serial port interaction. Both DLLs are old and do not
                    Message 9 of 28 , Feb 9, 2011
                      > >
                      > > My program to read values with the serial port (with
                      > ntport.dll and zntport.sys)
                      > > does not work in W7 64 bit. Is this normal and can it be solved?
                      > >
                      > > The program starts with:
                      > > open "com4:9600,n,8,1" for random as #commHandle
                      > > Port = hexdec("2EC")
                      > > and always worked well in W98 and W XP.
                      > >
                      >
                      > I believe ntport and zntport are for parallel port access
                      > only, and for that purpose the ancient versions that come
                      > with LB are a disaster, so do not use them under any circumstances.
                      >
                      > If you actually have parallel port accesses (INP() and OUT)
                      > in addition to serial port accesses, those DLLs may be the
                      > problem, since they seem to trash part of LB's memory. If you
                      > don't access the parallel port, I'm not sure what the problem is.
                      >

                      The ntport DLLs are only needed by the INP and OUT commands as already stated, they do not involve serial port interaction.

                      Both DLLs are old and do not fully support Vista and higher, nor 64-bit, but the latest version does, which Carl should include in
                      the next major release.


                      ---
                      Stefan Pendl
                      http://stefanpendl.runbasichosting.com/

                      Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
                      Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                      Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

                      Books at http://www.lulu.com/ and http://www.amazon.com/
                      Alyce Watson ... APIs for Liberty BASIC
                      Carl Gundel .... Beginning Programming with Liberty BASIC

                      Windows 7 Home Premium 64-bit RTM
                      AMD Turion X2 RM-70 2GHz, 4GB RAM
                    • Patric t'Kindt
                      Thanks! ________________________________ From: Stefan Pendl To: libertybasic@yahoogroups.com Sent: Wed, 9 February, 2011 21:06:56
                      Message 10 of 28 , Feb 9, 2011
                        Thanks!




                        ________________________________
                        From: Stefan Pendl <pendl2megabit@...>
                        To: libertybasic@yahoogroups.com
                        Sent: Wed, 9 February, 2011 21:06:56
                        Subject: RE: [libertybasic] Serial Port Read


                        > >
                        > > My program to read values with the serial port (with
                        > ntport.dll and zntport.sys)
                        > > does not work in W7 64 bit. Is this normal and can it be solved?
                        > >
                        > > The program starts with:
                        > > open "com4:9600,n,8,1" for random as #commHandle
                        > > Port = hexdec("2EC")
                        > > and always worked well in W98 and W XP.
                        > >
                        >
                        > I believe ntport and zntport are for parallel port access
                        > only, and for that purpose the ancient versions that come
                        > with LB are a disaster, so do not use them under any circumstances.
                        >
                        > If you actually have parallel port accesses (INP() and OUT)
                        > in addition to serial port accesses, those DLLs may be the
                        > problem, since they seem to trash part of LB's memory. If you
                        > don't access the parallel port, I'm not sure what the problem is.
                        >

                        The ntport DLLs are only needed by the INP and OUT commands as already stated,
                        they do not involve serial port interaction.

                        Both DLLs are old and do not fully support Vista and higher, nor 64-bit, but the
                        latest version does, which Carl should include in
                        the next major release.

                        ---
                        Stefan Pendl
                        http://stefanpendl.runbasichosting.com/

                        Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
                        Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                        Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

                        Books at http://www.lulu.com/ and http://www.amazon.com/
                        Alyce Watson ... APIs for Liberty BASIC
                        Carl Gundel .... Beginning Programming with Liberty BASIC

                        Windows 7 Home Premium 64-bit RTM
                        AMD Turion X2 RM-70 2GHz, 4GB RAM







                        [Non-text portions of this message have been removed]
                      • Sam
                        The LB versions of ntport and zntport do not even work properly on Windows 2000 or XP, as I can painfully attest. A single OUT command will trash LB s ability
                        Message 11 of 28 , Feb 9, 2011
                          The LB versions of ntport and zntport do not even work properly on Windows 2000 or XP, as I can painfully attest. A single OUT command will trash LB's ability to convert numbers among integer, long integer and floating formats. However, I can also confirm that the current version, which I bought from the developers, works fine. So if the newer version is included in future releases, all should be fine.

                          Sam W.

                          --- In libertybasic@yahoogroups.com, "Stefan Pendl" <pendl2megabit@...> wrote:
                          >
                          > > >
                          > > > My program to read values with the serial port (with
                          > > ntport.dll and zntport.sys)
                          > > > does not work in W7 64 bit. Is this normal and can it be solved?
                          > > >
                          > > > The program starts with:
                          > > > open "com4:9600,n,8,1" for random as #commHandle
                          > > > Port = hexdec("2EC")
                          > > > and always worked well in W98 and W XP.
                          > > >
                          > >
                          > > I believe ntport and zntport are for parallel port access
                          > > only, and for that purpose the ancient versions that come
                          > > with LB are a disaster, so do not use them under any circumstances.
                          > >
                          > > If you actually have parallel port accesses (INP() and OUT)
                          > > in addition to serial port accesses, those DLLs may be the
                          > > problem, since they seem to trash part of LB's memory. If you
                          > > don't access the parallel port, I'm not sure what the problem is.
                          > >
                          >
                          > The ntport DLLs are only needed by the INP and OUT commands as already stated, they do not involve serial port interaction.
                          >
                          > Both DLLs are old and do not fully support Vista and higher, nor 64-bit, but the latest version does, which Carl should include in
                          > the next major release.
                          >
                          >
                          > ---
                          > Stefan Pendl
                        Your message has been successfully submitted and would be delivered to recipients shortly.