Search found 15 matches

by Median Joe
Wednesday 23rd November 2022 9:07am
Forum: Beginners
Topic: Creating a library
Replies: 13
Views: 3776

Re: Creating a library

Thanks Bruce. Compiling from source means I don't need to install backports, which can be risky. I haven't done it yet but I'll let you know if I get any problems. As I said, I don't need the gtk libs but no harm in having them I guess.
by Median Joe
Tuesday 22nd November 2022 6:48pm
Forum: Beginners
Topic: Creating a library
Replies: 13
Views: 3776

Re: Creating a library

Does your desktop use x11 or is it wayland? The "About" tells me I'm using x11 and Qt5. The problem seems to be that I installed gambas from bullseye-backports (because I wanted the latest version) although I'm using a distro ( Q4OS Trinity ) based on Debian stable. It's not a big deal be...
by Median Joe
Saturday 19th November 2022 1:35pm
Forum: Beginners
Topic: Creating a library
Replies: 13
Views: 3776

Re: Creating a library

Getting back to your original post though. It's not an OOP/procedural thing it's just a shared library (in the Unix shared library sense). So if arithmetic.add() isn't working are you giving it some biscuits to work with like arithmetic.add(2,2)? Yes I did and I realize now it was nothing to do wit...
by Median Joe
Wednesday 16th November 2022 2:51pm
Forum: Beginners
Topic: Creating a library
Replies: 13
Views: 3776

Re: Creating a library

BruceSteers wrote: Wednesday 16th November 2022 2:04pm Did you read this page...
http://gambaswiki.org/edit/doc/library?ht=library
Yep.
My discovery....
Do not use main.module in the library.
Make another module in your library source or rename main.module
That worked. Many thanks Bruce!
by Median Joe
Wednesday 16th November 2022 12:14pm
Forum: Beginners
Topic: Creating a library
Replies: 13
Views: 3776

Creating a library

A library is just a group of subs and functions but should it have a different format than a normal project? Every project should have a startup method but for a library isn't it redundant? I tried creating this toy library, following the instructions in the docs : ' Gambas module file Export Public...
by Median Joe
Tuesday 15th November 2022 3:21pm
Forum: Project showcase
Topic: Routines for Set manipulation
Replies: 3
Views: 4372

Re: Routines for Set manipulation

now my brain hurts! That's how I feel about OOP! What was missing was a useful example. What do you do with these sets? Well it depends what you mean by "useful". I quite often write code similar to the above probability example, to find probabilities that are too complex to compute using...
by Median Joe
Tuesday 15th November 2022 10:00am
Forum: Project showcase
Topic: Routines for Set manipulation
Replies: 3
Views: 4372

Routines for Set manipulation

The set data structure is quite simple but can be very useful, and in fact the whole of mathematics can be founded on sets. A set is just a collection of values or items which are unique and unordered. e.g. S1 = {1,2,3} This is identical to the set {3,1,1,2,3,2} because repeated elements don't count...
by Median Joe
Saturday 12th November 2022 8:24am
Forum: Beginners
Topic: Getting a list of keywords
Replies: 6
Views: 1858

Re: Getting a list of keywords

OOP rocks :) All criticism of OOP (and there is a lot of it) seems to revolve around knowing when it's a appropriate to use it. It's a good fit for GUI, but maybe not other applications, like merging files or doing calculations for example. At least Gambas doesn't force OOP on you in all situations...
by Median Joe
Friday 11th November 2022 5:29pm
Forum: Beginners
Topic: Getting a list of keywords
Replies: 6
Views: 1858

Re: Getting a list of keywords

Thanks for the links. I have started reading Gerry's book which is very good (thanks Gerry!), but I would prefer something more systematic. A Beginner's Guide to Gambas by John Rittinghouse is more comprehensive but it's pretty old. Anyone read it? I don't want to have to unlearn anything and there'...
by Median Joe
Friday 11th November 2022 1:15pm
Forum: Beginners
Topic: Getting a list of keywords
Replies: 6
Views: 1858

Re: Getting a list of keywords

Thanks vuott,

I haven't quite got my head around how the Gambas object system works and was using the wrong syntax. I've always avoided OO languages until now and have only a hazy grasp of how OOP works, and all languages seem to implement it slightly differently.