home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9089 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.3 KB  |  41 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
  3. From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
  4. Subject: Re: Simple Terminal in QBASIC
  5. References: <92245.080949U24226@uicvm.uic.edu>
  6. Message-ID: <Bu4H67.M32@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Sat, 5 Sep 1992 20:34:54 GMT
  10. Lines: 29
  11.  
  12. <U24226@uicvm.uic.edu> writes:
  13.  
  14. >Hi! I'm trying to write a simple terminal
  15. >program in QBASIC. I've managed to get
  16. >the COM port set up and can get the
  17. >program to dial. I'm having problems
  18. >getting data from the modem. Every time
  19. >I use the get command (GET #22,t) I
  20. >get a bad record error. I think it's
  21. >because at the time I get the data
  22. >there is nothing to get. I tried using
  23. >the ON COM GOSUB routine. It goes to
  24. >my GET command I still get the same
  25. >error though.
  26. >Any Suggestions?
  27.  
  28.    Use something like this:
  29.  
  30.    if loc(22) > 0 then
  31.        x$ = input$(loc(22),#22)
  32.    else
  33.        x$ = ""
  34.    end if
  35.  
  36. -- 
  37. ------------------------------------------------------------------------
  38.  John A. Slagel     "My old man used to tell me, before he left this
  39.  j-slagel1@uiuc.edu  shitty world, never chase buses or women- you
  40.                      always get left behind." -The Marlboro Man
  41.