Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when inputting ASCII text from COM port
#1
In my quest to port my QB45 code over to QB64, I am finding things are not 100% portable. Okay, but I'm plugging along trying to learn them. Anyway, my latest is an issue in inputting ASCII text from a COM port. The text would be from 1 to 12 characters followed by the 'enter' key getting pressed. Elsewhere in the program I have used the command 'Open "COM5:9600,N,8,1,RS0,CS0,DS0,CD0" For Random As #1' to handle COM port communications. But for this case, I get a 'Bad File Mode' error for the 'Line Input #1, FILENAME$' command.

If I change the 'Random' to 'Input' I then get the 'Input Past End' error; even though I have not typed a single thing in to send over the comm port. I have tried doing a straight Input #1, and a Get #1, still with errors right off the bat without sending any data. I'm at yet another loss as to what I am missing.....

DEL1: 'Request file deletion COM5
Close #1
Open "COM5:9600,N,8,1,RS0,CS0,DS0,CD0" For Input As #1
Line Input #1, FILENAME$
KILL1$ = "E:\SERVER\CPM\" + KILLFILE$
Kill KILL1$
Put #1, , EOT$
STATLINE$ = Date$ + " - " + Time$ + " - COM5 File Delete Request"
GoSub EVENTSAVE
GoSub PRINTSTAT
Return
Reply


Messages In This Thread
Error when inputting ASCII text from COM port - by MichelleL - 01-23-2024, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac debugger not connecting, a user error! BlameTroi 0 110 02-07-2026, 06:18 PM
Last Post: BlameTroi
  ERROR MESSAGES COLORS ? aurel 5 399 01-02-2026, 11:26 AM
Last Post: aurel
  Using CONST & _RGB used together seem to error... Dav 12 714 12-12-2025, 12:29 AM
Last Post: Dav
  error doing image collision detection with _MemGet madscijr 55 4,765 10-01-2025, 03:25 PM
Last Post: bplus
  error on function returning _mem Herve 5 698 07-05-2025, 08:06 PM
Last Post: hsiangch_ong

Forum Jump:


Users browsing this thread: 1 Guest(s)