Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reads only 1 line of barcode scans
Message
De
06/03/2003 09:30:11
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
06/03/2003 06:51:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00762062
Message ID:
00762140
Vues:
19
fgets() stops reading data when it encounters a carriage return. If you are looking for more that one line of data then you need to use fread() or put fgets() in a loop that keeps looking for data until there is none. Personally, I user the mscom control for serial communications. It has an event that is always looking for data.

>Hi. VFP7 user
>
>I have written the following program to read barcode scans in from a barcode scanner plugged into my serial port:
>

>RUN mode COM1:9600,N,8,1
>myhandle=FOPEN('COM1')
>mydata=FGETS(myhandle)
>

>Problem: mydata only reports the first line of the scans. My program is obviously not finished...what's next??
>
>Thanks, Randy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform