Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS Comm experts
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00614817
Message ID:
00615084
Vues:
35
Reading the control.input does indeed clear THAT buffer. The buffer I was referring to is your form property that your are .input - ing into.

If your read up to your terminating character, what do you do if more data is in the buffer? Throw it away? Keep it until next time? Do you remove just what you want, then discard the rest? These are decisions you must make :>) If you have the data you need from your scan, and don't care after that, a simple
THISFORM.yourbufferproperty = ""
will take care of clearing the buffer.

Depending on your application, sometimes it is desirable to process the data in chunks. Let's say you have incoming text stream with CRLF combinations as a terminator. If I search the buffer for the CRLF pair, I know I have a complete line intact and can extract that from the buffer, and THEN delete that line from the buffer, leaving the remaining intact as it is incomplete at this moment. Does that make any sense?

>What is the best way to clear buffer. Of course, I am clearing the form buffer property everytime the oncomm is called. It looked like the input property cleared out by it self. How can I make sure the buffer is cleared?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform