Announcement

Collapse
No announcement yet.

picking out data from a string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46


    Not sure what is failing but by declaring counter locally you will (I think) reset it every time you call the routine

    Comment


    • #47


      counter is declared private, therefore it is not reset each time the function is called (private acts like static keyword)......

      var WorD[30]; func KbHandler(var Key) var private counter; var i;
      if(Key!=13)
      txt_MoveCursor(16,12); print([CHR] Key) ;
      word[counter++]:=Key; else for(i:=0; i30) //Going to need to reset the "WorD" buffer counter :=0; endif endfunc
      _______________
      Best Regards,
      Howard

      Comment


      • #48


        Thanks Howard..! I have been listening to this thread also and you have been a great help..!! There isn't many working examples of code out there to quickly form a working example of an object that are "commented" enough for "newbies" like myself. You seem to be a very good teacher of code writing and help everyone that is having trouble... I know it takes alot of your time keeping a eye on the msg threads coming through the fourm and providing lots of help and support.. !!

        Just wanted to to say thanks..!!

        Zonk
        "Questing the Killer 4D App"

        Comment


        • #49


          Hi Zonk,

          Thanks for the kudos and encouragement.... Its always nice to be appreciated! I enjoy helping out where I can, and try to follow the "teach a man to fish" method if possible....
          _______________
          Best Regards,
          Howard

          Comment

          Working...
          X