English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 10 April 2020, 07:40   #1
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Serial communication?

I'm trying to use the serial port but I get a syntax error for the OpenSerial command. Am I missing something obvious here?

Code:
OpenSerial "serial.device",0,9600,0
(Documentation: OpenSerial device$,unit#,baud,io_serflags)
MickGyver is offline  
Old 10 April 2020, 10:23   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Despite the documentation appearing to show otherwise, OpenSerial is a function and so needs brackets and a return value:

Code:
succ.l = OpenSerial("serial.device",0,9600,0)
That should do it...
Daedalus is offline  
Old 10 April 2020, 11:42   #3
Twiggy
\m/
 
Twiggy's Avatar
 
Join Date: Nov 2008
Location: Devon, U.K.
Posts: 573
I assume this is the sort of thing that's fixed in that Blitz Basic project? http://ubb.plus/
Twiggy is offline  
Old 10 April 2020, 13:43   #4
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Sadly not. There are lots of fixes in that document, but both the AB3 documentation and the UBB Plus manual retained the error from the original documentation of omitting the brackets. They do say that it's a function however, which in Blitz terms means it must have brackets if it has arguments, but it should be clearer.
Daedalus is offline  
Old 10 April 2020, 16:40   #5
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Daedalus View Post
Despite the documentation appearing to show otherwise, OpenSerial is a function and so needs brackets and a return value:

Code:
succ.l = OpenSerial("serial.device",0,9600,0)
That should do it...
That did it indeed. I tried the brackets but it also needed the return variable. Thanks a lot!
MickGyver is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
serial communication between Amiga and PC TCH support.Amiga Forever 6 24 March 2020 00:00
Amigastore.eu communication Englyst Amiga scene 14 22 January 2019 15:06
PC Serial to Amiga Serial lesta_smsc support.Hardware 48 02 December 2015 10:14
Serial Port <--> Tablet: no communication ral-clan support.WinUAE 0 02 February 2011 19:51
Supercars 2 communication screens jotd Retrogaming General Discussion 11 04 December 2006 18:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:22.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06705 seconds with 13 queries