Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reads only 1 line of barcode scans
Message
From
06/03/2003 09:30:11
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
06/03/2003 06:51:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00762062
Message ID:
00762140
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform