Page 1 of 1

Modules Documentation

Posted: Saturday 15th May 2021 11:15am
by Zyfriala
Hi, i'm not knew to Gambas, i'm just returning from programming in Java and C# and i intend to develop an app to acces my PostgreSql base.
In fact the app already exists, for a part, but i don't remember the real usage of modules...(i already have 5 of them...i know :)).
Where can i find good docs about that ?
Thx in advance.

Re: Modules Documentation

Posted: Saturday 15th May 2021 12:17pm
by PJBlack

Re: Modules Documentation

Posted: Saturday 15th May 2021 12:23pm
by cogier
Hi Zyfriala and welcome to the forum.

A module is just another place to put code. I have attached a very simple example that multiplies 2 numbers.

There are books on Gambas available here and here that might help.

You can have a look at the Gambas Farm to see examples of using DataBases.
TestApp-0.1.3.tar.gz
(12.07 KiB) Downloaded 262 times

Re: Modules Documentation

Posted: Monday 17th May 2021 1:54pm
by Zyfriala
Ok, it's a static class, i should have taken that in consideration when i built them :)
Thx both and thx for the example.
I am very impressed by the changes in the IDE, i'm on 3.16.0, it's becoming powerful
and very pleasant (but it always was).
I'm glad to see that Gambas is grown-up now :)
Just curious on how you both came to Gambas and how you use it ?

Re: Modules Documentation

Posted: Monday 17th May 2021 3:23pm
by cogier
Just curious on how you both came to Gambas…
1981 Sinclair ZX81 - Sinclair BASIC
1982 Sinclair Spectrum - Sinclair BASIC
Sinclair QL
1st PC Olivetti 286, 640k Ram, 40 MB hard drive - MS DOS 3, GW BASIC and Power BASIC
A few more PCs MS-DOS 4, 5, 6. Windows 3, 3.1, 95, 98, XP, Vista
2008 What's this Linux all about?
2012 Wanted to program something for a work situation. Needed a BASIC, tried various ones, but Gambas did the GUI out of the box.
It took a lot of learning as I had never used the 'VB' type of programming. In fact there is still plenty for me to learn!
... and how you use it?
I write code for work and have published 50+ programs under 'cogier' on the Farm, everything from simple coding examples, barcode and QR code creators, games etc.
My best program, in my opinion, is 'ScreenShot'. You can see what it can do here.

Re: Modules Documentation

Posted: Monday 17th May 2021 5:36pm
by Zyfriala
Impressive ! I notice that we started with Linux the same year...for me Ubuntu "Hardy Heron" (2008.04)...such a long time ago ! :)