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

strange results in debugger

Expand Messages
  • stefanhes
    It took me more than half an hour to find this error. Try to run this in the debugger and see the values of the variable when the sub kick in. (yes, I know the
    Message 1 of 4 , Jan 2, 2010
    • 0 Attachment
      It took me more than half an hour to find this error.
      Try to run this in the debugger and see the values of the variable when the sub kick in.

      (yes, I know the error, 2 times x0)

      But strange it is.

      Stefan Hesseling


      handle$ = "soWhat"
      call drawGraph handle$, 200, 300, "(x+2)*(x-3)"
      end


      sub drawGraph handle$, x0, x0, formules$
      trace 2
      print formules$
      y$ = word$(formules$,formNr)
      end sub
    • Stefan Pendl
      ... That is quite an interesting bug, since formNr is a local variable not an argument in the procedure definition. Seems the syntax parser needs quite an
      Message 2 of 4 , Jan 2, 2010
      • 0 Attachment
        >
        > It took me more than half an hour to find this error.
        > Try to run this in the debugger and see the values of the
        > variable when the sub kick in.
        >
        > (yes, I know the error, 2 times x0)
        >
        > But strange it is.
        >
        > Stefan Hesseling
        >
        >
        > handle$ = "soWhat"
        > call drawGraph handle$, 200, 300, "(x+2)*(x-3)"
        > end
        >
        >
        > sub drawGraph handle$, x0, x0, formules$
        > trace 2
        > print formules$
        > y$ = word$(formules$,formNr)
        > end sub
        >

        That is quite an interesting bug, since formNr is a local variable not an argument in the procedure definition.

        Seems the syntax parser needs quite an update to catch this.

        ---
        Stefan Pendl

        Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
        Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

        Books at http://www.lulu.com/
        APIs for Liberty BASIC ..................... by Alyce
        Beginning Programming with Liberty BASIC ... by Carl

        Windows Vista Home Premium 32-bit SP2
        AMD Turion X2 RM-70 2GHz, 4GB RAM
      • stefanhes
        ... So, you think I have to put this on the conforums bug reports?
        Message 3 of 4 , Jan 2, 2010
        • 0 Attachment
          > That is quite an interesting bug, since formNr is a local variable not an argument in the procedure definition.
          >
          > Seems the syntax parser needs quite an update to catch this.
          >
          > ---
          > Stefan Pendl
          >

          So, you think I have to put this on the conforums bug reports?
        • Stefan Pendl
          ... Yes, Stefan, I would even put it on the beta testing board, so it would be possible to fix it for the next release. ... Stefan Pendl Liberty BASIC Assist
          Message 4 of 4 , Jan 2, 2010
          • 0 Attachment
            >
            > > That is quite an interesting bug, since formNr is a local
            > variable not an argument in the procedure definition.
            > >
            > > Seems the syntax parser needs quite an update to catch this.
            > >
            > > ---
            > > Stefan Pendl
            > >
            >
            > So, you think I have to put this on the conforums bug reports?
            >

            Yes, Stefan, I would even put it on the beta testing board, so it would be possible to fix it for the next release.

            ---
            Stefan Pendl

            Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
            Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

            Books at http://www.lulu.com/
            APIs for Liberty BASIC ..................... by Alyce
            Beginning Programming with Liberty BASIC ... by Carl

            Windows Vista Home Premium 32-bit SP2
            AMD Turion X2 RM-70 2GHz, 4GB RAM
          Your message has been successfully submitted and would be delivered to recipients shortly.