🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1301

Re: Simple Terminal in QBASIC

#1301
From: John A. Slagel
Date: Sat, 05 Sep 1992 20:34
29 lines
1402 bytes
<U24226@uicvm.uic.edu> writes:

>Hi! I'm trying to write a simple terminal
>program in QBASIC. I've managed to get
>the COM port set up and can get the
>program to dial. I'm having problems
>getting data from the modem. Every time
>I use the get command (GET #22,t) I
>get a bad record error. I think it's
>because at the time I get the data
>there is nothing to get. I tried using
>the ON COM GOSUB routine. It goes to
>my GET command I still get the same
>error though.
>Any Suggestions?

   Use something like this:

   if loc(22) > 0 then
       x$ = input$(loc(22),#22)
   else
       x$ = ""
   end if

-- 
------------------------------------------------------------------------
 John A. Slagel     "My old man used to tell me, before he left this
 j-slagel1@uiuc.edu  shitty world, never chase buses or women- you
                     always get left behind." -The Marlboro Man
Technical Details
Message-ID: <Bu4H67.M32@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
References: <92245.080949U24226@uicvm.uic.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Subject: Re: Simple Terminal in QBASIC
References: <92245.080949U24226@uicvm.uic.edu>
Message-ID: <Bu4H67.M32@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Date: Sat, 5 Sep 1992 20:34:54 GMT
Lines: 29