PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: FreeBASIC, so...  (Read 4105 times)

Pierre Bellisle

  • Junior Member
  • **
  • Posts: 102
FreeBASIC, so...
« on: December 17, 2016, 05:53:57 PM »

FreeBASIC, so...

Six weeks ago I had the pleasure to receive a wm_message from Jose,
telling me that I might be interested in FreeBASIC.

I had looked before at what was said on Wikipedia,
because of the reference to DOS and QuickBASIC, wich I loved by the way,
I thought it was a nostalgic language from the past.
So I never give the compiler real attention.

Plus, I've tried PureBASIC and realized it was going the opposite of what I like about a compiler.
So I was more thinking to migrate to the C family.

But, If Jose and Paul are involved in FreeBASIC, then the least I could do, is give it a try.

Much can be said about pointers, the powerfull syntax, the C approach, the use of com,
the 32/64 bit, the multi platform, the full range of integer type, etc, ect. And yet, I only saw the tip of it...

It's like a PowerBASIC v14 with all the DDT removed.  ;-)

Jose, thank you!

Pierre
Logged

Josť Roca

  • Guru Member
  • *****
  • Posts: 3282
Re: FreeBASIC, so...
« Reply #1 on: December 18, 2016, 04:43:05 AM »

Welcome Pierre,

Like you, I didn't pay much attention to it and looked at other languages, until I decided to give it a try. I soon feel at ease with it because, thanks to its QBasic heritage, it has a syntax almost identical to PowerBASIC, instead of the weird syntaxes found in other Basic dialects.

The use of TYPEs instead of classes also mislead me into thinking that it was simply a cheap way of giving some OOP support, but the truth is that they are very useful and efficient. Overloading is also a feature that I use extensively. Dead code removal is also available if you use source code instead of libraries.

As I'm going to use it only with Windows, I have ported my framework for PowerBASIC to FreeBASIC, with some improvements, and Paul's editor lets us to work comfortably. The editor comes with many templates and projects that I have written to demonstrate the use of the framework. It's use is, of course, optional, and you can use the editor to write code using pure SDK if you want.

After using it for several months, I no longer miss PowerBASIC.

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: FreeBASIC, so...
« Reply #2 on: December 18, 2016, 12:50:47 PM »

After using it for several months, I no longer miss PowerBASIC.
I agree 100%. Like every new thing you learn, it takes a bit of time. However learning FreeBASIC was considerably easier than most because many of the concepts from other BASIC's translate simply into FreeBASIC. The syntax with regards to using the WinAPI is a bit stricter. You can't simply use a DWORD to represent a pointer, etc. The COM support is certainly not as advanced as PB's is but granted not many PB'ers used COM extensively anyway. Having said that there are many things that FreeBASIC does better than PB including overloaded functions and classes. With Jose's functions and classes there is really nothing in FB that we can't do. FB certainly has all the power of C and ease of use of PB.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: FreeBASIC, so...
« Reply #3 on: December 18, 2016, 08:52:43 PM »

Actually, I am kind of surprised that most PB'ers have not switched away from PB. FreeBASIC is a great alternative. The 64bit and cross-platform capabilities should be enough reason. I have every one of my PB applications ported to FreeBASIC (except for FireFly because I want to write a new version of that on top of the new WinFBE Editor).
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Pierre Bellisle

  • Junior Member
  • **
  • Posts: 102
Re: FreeBASIC, so...
« Reply #4 on: December 19, 2016, 12:24:18 AM »

I guess that not much have been said about FreeBasic to PB users,
in a sense the PowerBASIC forum is a delicate place to post about the competition.

Also, I think much PBers are attach to DDT and are reluctant to SDK.
On my side I really love dialogs and I'm ok with the DDT part that create them.
The part that is less atractive, at least for me, is the idea to wrap all Windows api in a DDT equivalent.
Having DIALOG END instead of EndDialog is superfluous as far as I'm concerned.

I guess it is where, let's say Free differ from Power and Pure,
the latest is oriented extensively on gadjets developpement, kind of DDT equivalent.
And it's OK, there is a compiler for everyone and a lot of people like that.

PBers average age is around 95, many are hobyist, few need 64bits, so changing compiler is not an easy choice.
Not to say that FreeBASIC will be harder for a newbe to tame.
Of course, it worth it...  :-)


Logged

Nathan Durland

  • Junior Member
  • **
  • Posts: 83
Re: FreeBASIC, so...
« Reply #5 on: January 09, 2017, 03:43:19 PM »

Actually, I am kind of surprised that most PB'ers have not switched away from PB. FreeBASIC is a great alternative. The 64bit and cross-platform capabilities should be enough reason. I have every one of my PB applications ported to FreeBASIC (except for FireFly because I want to write a new version of that on top of the new WinFBE Editor).

For me, it's all about SQL_Tools and ODBC access.  I primarily use PB (and FireFly!) at work to generate some fairly complex apps that have to access my ERP on Sybase, scanning system on MSSql, and some in-house stuff on MySQL.  Yes, I know I can create libraries to do my own ODBC or ADO, but to be honest, that's why I purchased SQLT to begin with; I don't have the time or expertise required to roll my own.   I'm sure I can probably create a new SQL_TOOLS.INC file to create a Freebasic compatible interface, but just haven't had the time.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: FreeBASIC, so...
« Reply #6 on: January 09, 2017, 05:42:26 PM »

Hi Nathan, yes, I can certainly understand your apprehension to change. I will point out though that Jose has already created ODBC classes for FreeBasic (32 and 64 bit) all available in source code format for free. It is part of his CWindow package found at http://www.planetsquires.com/protect/forum/index.php?topic=3966.0
No need to be tied into proprietary SQL_Tools. Granted, having learned SQL_Tools is an investment that would be hard to give up especially if you only need ODBC sparingly.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Josť Roca

  • Guru Member
  • *****
  • Posts: 3282
Re: FreeBASIC, so...
« Reply #7 on: January 09, 2017, 07:27:59 PM »

I only have recommended Free Basic to Pierre because, although he used DDT for the GUI, the rest of his code was pure SDK, so I knew that he was not going to have any problem to adapt. Paul and I have also adapted to it quikly because we are also SDK programmers. We like to use compilers that allow us to program the way we want, instead of becoming "gadget" users.

I think that most DDTer's will remain using PowerBASIC, and the ones that will switch, will choose another compiler like Pure Basic with many "gadgets". Anything but learning SDK proramming.
« Last Edit: January 10, 2017, 02:00:36 PM by Jose Roca »
Logged

Petrus Vorster

  • Senior Member
  • ***
  • Posts: 465
Re: FreeBASIC, so...
« Reply #8 on: January 10, 2017, 01:33:51 PM »

Most of the DDt'ers , like myself have no choice but to stick with Powerbasic at the moment.
Only a handful of them has the skills to join the SDK brigade, who is regretfully centuries ahead in programming.
Its not nice to admit that I don't always catch much of the stuff you sometimes discuss, but those gadgets, bells and whistles that came with useful tools like Firefly made "reasonable" programming accessible to many of us, or else i probably would still be using an abacus.

All we bunch of gadget dependents can do right now is pray Paul comes up with a new firefly for FB with all JosŤ's latest Cwindow developments and gadgets.
Lol, its much easier to drive a car and drive it well than having to design and build it first if you know what i mean.

 :D
 
Logged

Eddy Van Esch

  • Senior Member
  • ***
  • Posts: 246
  • FF3 User
    • DevOTechS
Re: FreeBASIC, so...
« Reply #9 on: February 01, 2017, 04:59:40 AM »

... Paul and I have also adapted to it quikly because we are also SDK programmers.

I think that most DDTer's will remain using PowerBASIC, and the ones that will switch, will choose another compiler like Pure Basic with many "gadgets". Anything but learning SDK proramming.
Exactly my thoughts, Jose.
That is basically the reason I still have not switched to FB (that and the fact that I have not been doing much programming lately anyway).
FB is SDK programming, so it is much 'closer' to the heart of Windows.
That is what I have always liked about PB: you could do SDK programming if you wanted, but if you didn't wanted to be bothered with the nuts and bolts of Windows, you could use DDT programming. Or even much better: FireFly !
I am soon going to write a little tool for myself, using FireFly and PB. Just for fun actually.  :)

PS. There is good news (I hope) about PB. See :
http://www.planetsquires.com/protect/forum/index.php?topic=3993

Kind regards
Eddy
« Last Edit: February 01, 2017, 05:01:41 AM by Eddy Van Esch »
Logged
Eddy