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

2 problems

Expand Messages
  • Norman
    Hello All I have two problems / querries Problem 1) Program 1 runs ok with no errors Program 2 runs ok with no errors but program 3 gives a single dimension
    Message 1 of 8 , Aug 7, 2010
      Hello All

      I have two problems / querries
      Problem 1)
      Program 1 runs ok with no errors
      Program 2 runs ok with no errors
      but program 3 gives a "single dimension array" error when compiling

      Problem 2)
      I have lost the error log. It is not in the Liberty directory and cannot be found with search

      The Liberty directory is C:\LibertyBASIC
      and the .bas code is in diretory C:\LibertyBASIC\Project\Geocaching
      Liberty is started from an icon on the desktop and it is configured to "run as administrator"
      OS is Vista premium 2
      Liberty is v4.04

      Thanks Nomps

      '++++++++++++++++++++++++++++++++++++++++++
      'Program 1
      gosub [Initialise]
      dim FileData$(10,10)
      'Some code
      '
      '
      '
      'Code end
      Array1$="qwerty"
      notice chr$(13);Array1$
      files Directory$,FileData$()
      print FileData$(0,0)
      goto [FinAll]



      [Initialise]
      dim Array1$(12)
      dim Array2$(20)
      OneString$="GGGGG"
      Directory$="C\:"
      return

      [FinAll]
      'Some code
      '
      '
      '
      'Code end
      end
      '++++++++++++++++++++++++++++++++++++++++++

      '++++++++++++++++++++++++++++++++++++++++++
      'Program 2

      gosub [Initialise]
      'Some code
      '
      '
      '
      'Code end
      Array1$="qwerty"
      notice chr$(13);Array1$
      goto [FinAll]



      [Initialise]
      dim Array1$(12)
      dim Array2$(20)
      dim FileData$(10,10)
      OneString$="GGGGG"
      Directory$="C\:"
      files Directory$,FileData$()
      print FileData$(0,0)
      return

      [FinAll]
      'Some code
      '
      '
      '
      'Code end
      end
      '++++++++++++++++++++++++++++++++++++++++++

      '++++++++++++++++++++++++++++++++++++++++++
      'Program 3

      gosub [Initialise]
      'Some code
      '
      '
      '
      'Code end
      Array1$="qwerty"
      notice chr$(13);Array1$
      files Directory$,FileData$()
      print FileData$(0,0)
      goto [FinAll]



      [Initialise]
      dim Array1$(12)
      dim Array2$(20)
      dim FileData$(10,10)
      OneString$="GGGGG"
      Directory$="C\:"
      return

      [FinAll]
      'Some code
      '
      '
      '
      'Code end
      end
      '++++++++++++++++++++++++++++++++++++++++++
    • Stefan Pendl
      ... The code is parsed from top to bottom during compilation and not along the programs flow, so the dimensioning of the array is checked after it is used. ...
      Message 2 of 8 , Aug 7, 2010
        >
        > '++++++++++++++++++++++++++++++++++++++++++
        > 'Program 3
        >
        > gosub [Initialise]
        > 'Some code
        > '
        > '
        > '
        > 'Code end
        > Array1$="qwerty"
        > notice chr$(13);Array1$
        > files Directory$,FileData$()
        > print FileData$(0,0)
        > goto [FinAll]
        >
        >
        >
        > [Initialise]
        > dim Array1$(12)
        > dim Array2$(20)
        > dim FileData$(10,10)
        > OneString$="GGGGG"
        > Directory$="C\:"
        > return
        >
        > [FinAll]
        > 'Some code
        > '
        > '
        > '
        > 'Code end
        > end
        > '++++++++++++++++++++++++++++++++++++++++++
        >

        The code is parsed from top to bottom during compilation and not along the programs flow, so the dimensioning of the array is
        checked after it is used.

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

        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
      • Norman Eskriett
        Thanks for that Stefan So if an array with 100 elements was created in [Initialise] and an element greater than 10 was used in the code before [Initialise]
        Message 3 of 8 , Aug 8, 2010
          Thanks for that Stefan



          So if an array with 100 elements was created in [Initialise] and an element greater than 10 was used in the code before [Initialise] then this would also give a compile error.

          Do you have any thoughts on the error log situation


          Thanks again

          Nomps


          To: libertybasic@yahoogroups.com
          From: pendl2megabit@...
          Date: Sat, 7 Aug 2010 23:27:34 +0200
          Subject: RE: [libertybasic] 2 problems






          >
          > '++++++++++++++++++++++++++++++++++++++++++
          > 'Program 3
          >
          > gosub [Initialise]
          > 'Some code
          > '
          > '
          > '
          > 'Code end
          > Array1$="qwerty"
          > notice chr$(13);Array1$
          > files Directory$,FileData$()
          > print FileData$(0,0)
          > goto [FinAll]
          >
          >
          >
          > [Initialise]
          > dim Array1$(12)
          > dim Array2$(20)
          > dim FileData$(10,10)
          > OneString$="GGGGG"
          > Directory$="C\:"
          > return
          >
          > [FinAll]
          > 'Some code
          > '
          > '
          > '
          > 'Code end
          > end
          > '++++++++++++++++++++++++++++++++++++++++++
          >

          The code is parsed from top to bottom during compilation and not along the programs flow, so the dimensioning of the array is
          checked after it is used.

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

          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]
        • Stefan Pendl
          ... Open an explorer window, enter %APPDATA% into the address box and hit enter/return. You will find the error.log in the folder Liberty BASIC v4.04 or
          Message 4 of 8 , Aug 8, 2010
            >
            > So if an array with 100 elements was created in [Initialise]
            > and an element greater than 10 was used in the code before
            > [Initialise] then this would also give a compile error.
            >
            > Do you have any thoughts on the error log situation
            >

            Open an explorer window, enter %APPDATA% into the address box and hit enter/return.

            You will find the "error.log" in the folder "Liberty BASIC v4.04" or "Liberty BASIC Pro v4.04", depending on the LB version you use.

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

            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
          • Norman Eskriett
            Thanks again Stefan Found it Didn t realise there would be 2 copies of any program resident on the hard drive. Not like the old days of the Acorn Atom, Dragon
            Message 5 of 8 , Aug 8, 2010
              Thanks again Stefan



              Found it

              Didn't realise there would be 2 copies of any program resident on the hard drive.

              Not like the old days of the Acorn Atom, Dragon and BBC computers when memory and disc space were at a premium.



              Once again in your debt

              Nomps



              To: libertybasic@yahoogroups.com
              From: pendl2megabit@...
              Date: Sun, 8 Aug 2010 11:46:42 +0200
              Subject: RE: [libertybasic] 2 problems






              >
              > So if an array with 100 elements was created in [Initialise]
              > and an element greater than 10 was used in the code before
              > [Initialise] then this would also give a compile error.
              >
              > Do you have any thoughts on the error log situation
              >

              Open an explorer window, enter %APPDATA% into the address box and hit enter/return.

              You will find the "error.log" in the folder "Liberty BASIC v4.04" or "Liberty BASIC Pro v4.04", depending on the LB version you use.

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

              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]
            • Stefan Pendl
              ... There are not two copies, there is only one separation, so the user-changeable data gets separated from the one the user is not supposed to change. ...
              Message 6 of 8 , Aug 8, 2010
                >
                > Found it
                >
                > Didn't realise there would be 2 copies of any program
                > resident on the hard drive.
                >
                > Not like the old days of the Acorn Atom, Dragon and BBC
                > computers when memory and disc space were at a premium.
                >

                There are not two copies, there is only one separation, so the user-changeable data gets separated from the one the user is not
                supposed to change.

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

                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
              • Norman Eskriett
                What threw me was versions of Liberty BASIC v4.04, one in C: drive root with just the program and as you say one in the application directory with the working
                Message 7 of 8 , Aug 8, 2010
                  What threw me was versions of Liberty BASIC v4.04, one in C:\ drive root with just the program and as you say one in the application directory with the working data required



                  Thanks again Stefan for you help.

                  Nomps



                  To: libertybasic@yahoogroups.com
                  From: pendl2megabit@...
                  Date: Sun, 8 Aug 2010 14:21:58 +0200
                  Subject: RE: [libertybasic] 2 problems






                  >
                  > Found it
                  >
                  > Didn't realise there would be 2 copies of any program
                  > resident on the hard drive.
                  >
                  > Not like the old days of the Acorn Atom, Dragon and BBC
                  > computers when memory and disc space were at a premium.
                  >

                  There are not two copies, there is only one separation, so the user-changeable data gets separated from the one the user is not
                  supposed to change.

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

                  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]
                • Stefan Pendl
                  ... LB 4.04 is fully Vista and higher compatible, so there is no need to install into a different folder than the Program Files folder. This one reason, why
                  Message 8 of 8 , Aug 8, 2010
                    >
                    > What threw me was versions of Liberty BASIC v4.04, one in C:\
                    > drive root with just the program and as you say one in the
                    > application directory with the working data required
                    >

                    LB 4.04 is fully Vista and higher compatible, so there is no need to install into a different folder than the "Program Files"
                    folder.
                    This one reason, why the user-changeable files are located in a folder, where the user has write access.

                    This is outlined at http://basic.wikispaces.com/Installing_on_Vista

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

                    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
                  Your message has been successfully submitted and would be delivered to recipients shortly.