Search found 9 matches

by sarpomira
Thursday 14th January 2021 8:03pm
Forum: General
Topic: RS232 / Serial Support
Replies: 2
Views: 619

Re: RS232 / Serial Support

I found this several months ago when working with Arduino communication. Not mine. This may help with your syntax and setup. Private Sport As SerialPort Const None As Integer = 0 Private RxLen As Integer Private Rx As String Public Sub Form_Open() Sport = New SerialPort As "Sport" Sport.PortName = "...
by sarpomira
Thursday 14th January 2021 6:55pm
Forum: General
Topic: User Define Types
Replies: 10
Views: 1541

Re: User Define Types

Thanks everyone.
Got it working.

My erroneous code for instantiating a struct object:
Public EmployeeRecord As Employee
Correct method of instantiation:
Public EmployeeRecord As New Employee
cheers
by sarpomira
Wednesday 13th January 2021 11:36pm
Forum: General
Topic: User Define Types
Replies: 10
Views: 1541

Re: User Define Types

Thanks BruceSteers,
Tried your code.
Still no luck. :(

I wonder is "Struct" has a dependency to a Component added from the component library ?
by sarpomira
Thursday 07th January 2021 6:54pm
Forum: General
Topic: User Define Types
Replies: 10
Views: 1541

Re: User Define Types

Once again, thank you gentlemen.
Much appreciated
by sarpomira
Thursday 07th January 2021 4:42pm
Forum: General
Topic: User Define Types
Replies: 10
Views: 1541

Re: User Define Types

Thanks for the reply. I keep hitting an error when setting the variable values (strings). Gambas is requesting an "AS" in the definition. Any idea what could be causing this? Public Struct Employee EmployeeNo As String FirstName As String LastName As String End Struct Public EmployeeRecord As Employ...
by sarpomira
Wednesday 06th January 2021 3:25am
Forum: General
Topic: User Define Types
Replies: 10
Views: 1541

User Define Types

Hello, In VB6 there were "User Defined Types" available. Does Gambas have a similar construct? I am unable to get the traditional VB syntax to work Example of the VB syntax for creating a User Defined Type: Type Employee As String FirstName As String LastName As String DateOfHire As Date Salary As C...
by sarpomira
Monday 28th December 2020 8:44pm
Forum: General
Topic: Get the last record in a CSV file
Replies: 5
Views: 814

Re: Get the last record in a CSV file

Stevedee, With a few mods, your code works also. Here's how I did it. Thanks 'Requires the addition of the gb.util library Public myCSVfile As CsvFile Public Sub cmdRead_Click() Dim filepath As String Dim aFields As String[] Dim iRecords As Integer Dim colRecords As New Collection Dim thisRecord As ...
by sarpomira
Monday 28th December 2020 7:28pm
Forum: General
Topic: Get the last record in a CSV file
Replies: 5
Views: 814

Re: Get the last record in a CSV file

Thanks for the speedy response guys.

cogier, that example you constructed works great. Wow.

cheers
by sarpomira
Monday 28th December 2020 4:45pm
Forum: General
Topic: Get the last record in a CSV file
Replies: 5
Views: 814

Get the last record in a CSV file

Hello, Boy am I happy I found Gambas3 and this forum :-) After programming VB6 and VB.net for many years, moved to Python for many of the control and MQTT "internet of things" projects that I have. I also run Linux, which limited me from good GUI applications. Until now. Gambas is awesome, light, fa...