Variables when opening Com port under Windows

General FreeBASIC programming questions.
Post Reply
KenHorse
Posts: 56
Joined: Jan 27, 2012 0:08

Variables when opening Com port under Windows

Post by KenHorse »

Subject says it all. I've not been able to make it work:

Code: Select all

Dim ComPort As Byte
Dim Baud As Long

ComPort = Command(1)
Baud = Command(2)

Open Com "ComPort:Baud,n,8,1,CS0,DS0" As #1
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Variables when opening Com port under Windows

Post by fxm »

I can not test it but ...

Code: Select all

Dim ComPort As String
Dim Baud As String

ComPort = Command(1)
Baud = Command(2)

Open Com Comport & ":" & Baud & ",n,8,1,CS0,DS0" As #1
KenHorse
Posts: 56
Joined: Jan 27, 2012 0:08

Re: Variables when opening Com port under Windows

Post by KenHorse »

Oh right....duh......
(that does work)
Post Reply