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

41593RE: [libertybasic] SIMPLE

Expand Messages
  • Stefan Pendl
    Oct 3, 2010
    • 0 Attachment
      >
      > >
      > > Hello Stefan
      > > Following to my previous message, I tried to have the
      > > following code working ok but it does not, the first column
      > > of txtboxes “time” is working ok but the second column of
      > > “distance” doesn’t. I tried to modify your code in a right way.
      > > Could you please help by copying the following variables,
      > > each group to its txtboxes, so that the code will work ok.  
      > Thank you.
      >
      > The part to initiate the second timer will never be executed
      > and you can only have one timer for one program.
      > You will have to read the help file topics about the commands
      > you use very carefully.
      >

      ---snip

      > [quit]
      > CLOSE #A
      > END
      > '---code end
      >

      I forgot to mention, that it is recommended to turn the timer off, if it is no longer needed, so you do not get unexpected results
      due to code being executed, which is no longer relevant.

      In your case the timer must only be stopped in the quit event handler.

      '---code start (watch for line wraps)
      [quit]
      TIMER 0 '<<--- Turn timer off
      CLOSE #A
      END
      '---code end

      ---
      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
    • Show all 17 messages in this topic