Dav's Qbasic Site.

Dav's mug.

 

Main

News

Forum

Qbasic/QB45

QB64

QBKB

Projects

More...

 

Forum


Back to Messages

Lukes52 (Thu Dec 21 2017 at 8:22 pm)
com port Read QB64

I have a very simple application that I need help on. I have an A/D converter feeding Com3. The A/D is attached to a 1.2 V battery for testing  I am confident the Com Port Buffer contains: 
 Voltage = 1.2, *   
If I open  with OPEN .... FOR INPUT ... the Open command sets EOF= -1 so when it hits the INPUT #2 statement for reading the buffer I naturally get an INPUT PAST END error b/c EOF= -1.
If I open with FOR RANDOM and use GET I get a BAD FILE LENGTH error b/c the open statement has set LOF =0.
This seems to be a fundamental problem within QB64.
I know the Buffer message is there b/c when I say continue anyway upon the INPUT PAST END error I actually get part of the message. At that point LOC =17 but LOF is still 0.


Reply to this Message


Name
Subject
Message

No HTML code will be allowed in the message.
All SPAM and inappropriate material will be deleted.

Powered by FlatForum 1.4

© Copyright 2011 by Dav - All Rights Reserved.
Hosted by www.qbasicnews.com.
Users now online: 1
Hits: 3840