PlanetSquires Forums

Support Forums => General Board => Topic started by: Paul Squires on August 17, 2015, 10:23:19 PM

Title: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 17, 2015, 10:23:19 PM
Hi everyone,

We've been together for a long haven't we  :)   As most of you know, PowerBASIC is now a dead company with a dead end product. It is going on 3 years since Bob Zale died and the the company is in worse shape than ever.

My question: Are you guys still sticking with PowerBASIC? Personally, I have totally moved on to FreeBASIC. Every day I am building more and more tools to make myself more productive in FB. I hope that by the end of the summer that I will have enough code to ensure that I can create just about whatever I need in 32 bit and 64 bit.

Other than FireFly itself, I have no legacy PB based programs that I need to maintain for the future. Hopefully eventually even FireFly itself will be re-written in FreeBASIC and its source code released to everyone.

I have been debating what to do with the PB version of FireFly. Should it go freeware? I know that you guys have paid a lot of money for this software so how do you feel about it being freeware? I know that I do not want to actively maintain and grow the PB version any further than it is now (I know you don't want to hear that!).

I plan to keep this support forum going and possibly opening it up to the general public should FireFly go freeware.

I would be interested in hearing your thoughts about what FireFly for PowerBASIC should become.




Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Kenny on August 18, 2015, 05:09:08 AM
Well, I have bought every version of FF you have released, but I have been hoping you would release the source code instead of letting it die. 

As for PB being dead... I agree it doesn't look good for future updates, but I can still do what I need to do with it for the time being.  It would be nice to be able to produce 64 bit programs, but I have yet to have a real need.  I am not selling programs, so that makes it easier to not worry too much about the future.  I am more interested in being able to quickly create things I need with something I am used to.

I hope it doesn't cost you too much to keep the forum up.  Thanks for creating a great product in FF. 


David

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 18, 2015, 08:16:06 AM
Thanks David!  The forum doesn't cost me much each month. I have a hosting package that allows me to have unlimited domains so I am paying a flat fee each month regardless of the amount of content I host. I also see your point that if you are only producing programs for your personal use then maybe learning a new product would not be of much benefit. Personally, I know that I will be programming for at least another 10 or 15 years so sticking with PowerBASIC is not an option.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Petrus Vorster on August 18, 2015, 08:40:23 AM
I know i am not one of the big boys in the forum, but it serves no purpose to stick with PB anymore.
I will follow you Paul in the Fb quest.
Soon i think we will have all the nice little buttons (Like the xp one) and gadgets and so forth for FB which have kept me on PB until now.
I'm in.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: James Fuller on August 18, 2015, 08:57:22 AM
Paul,
  I am not coding for $ presently but still have that mindset as opposed to a strickly hobby endeavour. I still feel PowerBASIC would be my goto language in the event of a contract job.
  FreeBasic has come a long way in  dkl's hands, but I find the direction it took to 64bit a bit of a head scratcher. I know he probably had little choice but...

  Translate all your needed headers from c/c++ to FreeBasic.
  FreeBasic translates your basic source to c/c++
  FreeBasic tanslates your Freebasic headers back to c/c++.
  compile with g++.


I know I am prejudice but I'll stick with my bc9Basic, UbxWx, and a new cross platform fork in the works with fewer prerequisites than UbxWx.
On Windows I get my choice of a number of c/c++ compilers Visual C++,TDM-GCC, PellesC all in 32/64.

In the contract work I did the source was the clients not mine. They embraced PowerBASIC so that was no problem but in todays market I think c/c++ would be prefered to FreeBasic.

James



Title: Re: Are you guys sticking with PowerBASIC?
Post by: Klaas Holland on August 18, 2015, 06:09:45 PM

I agree with Petrus Vorster,
So I did switch a Powerbasic Program to FreeBasic (with the help of Paul of course, much appreciated).
It took me a couple of days for this first program which is using a MySql Database.
The program runs just like the PB version, with the same speed.

The nice thing is the FF_Functions are the same.
You just have to change the headers a little bit.
When you are used to SDK programming then the rest is piece of cake.
There are some differences, but you get used to it very soon.
Some things are even nicer with pure SDK programming.

Sooner or later we have to leave PowerBasic for what it is.
For me that moment is now I think.
FF for FreeBasic is the easiest way to move on.

So Paul, what you want to do with FF for PowerBasic is your business.
Do you think you get more interest when you make it open source?

My opinion is you will get more curiosity from the Powerbasic side when you charge a little price for FF for FreeBasic.

Klaas 
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 18, 2015, 10:54:30 PM
Thanks for you feedback guys. I do not plan to make the current PowerBasic FireFly source code open source. The PowerBasic version would be freeware at best. I am thinking that I may not do that. It would generate a flurry of new users from the PB forums and I really do not want to be supporting new users. I would rather spend my time learning FreeBASIC and helping other PB'ers move to that language as well.

FireFly for FreeBASIC is what I want to concentrate on. Eventually I would like to re-write the designer using nothing but FreeBASIC and other open source libraries. I would like FireFly for FB to be free and open source. It would take a lot of work to get to that point but it will be worth it to the community.

I have little or no interest in trying to make money from selling programmer tools anymore. If I ever do sell programs again then they will not be programmer tools.  :)

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Gary Stout on August 19, 2015, 08:27:40 AM
Quote from: TechSupport on August 18, 2015, 10:54:30 PM
I have little or no interest in trying to make money from selling programmer tools anymore.

Paul,
I appreciate all you have done for the PB community and what you are now doing for the FB community. If you have no desire to make money off of your tools, how about a "Donate" button on your website so we can at least make a contribution to support your efforts? I am sure most here would be willing to support the cause  ;)

Thanks again Paul!

Gary
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Petrus Vorster on August 19, 2015, 08:40:23 AM
Why not? Wikipedia has been asking donations the whole month now!!!
Then why not this forum?
Really smart idea there Gary.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Knuth Konrad on August 19, 2015, 12:17:18 PM
Quote from: TechSupport on August 17, 2015, 10:23:19 PM
I have been debating what to do with the PB version of FireFly. Should it go freeware? I know that you guys have paid a lot of money for this software so how do you feel about it being freeware? I know that I do not want to actively maintain and grow the PB version any further than it is now (I know you don't want to hear that!).

I plan to keep this support forum going and possibly opening it up to the general public should FireFly go freeware.

I would be interested in hearing your thoughts about what FireFly for PowerBASIC should become.

I personally have no problems with FF/PB going freeware somewhen in the future, as I bought my copy long ago and have gotten my money's worth back meanwhile.

As for "sticking to PB" ... sort of ... PB was never my main development tool, that was VB6. I use(d) to PB/Win to enhance VB with DLLs. I use(d) PB/CC for IT staff tools. I'll keep it that way for the time being = maintaining what is there.

I've considered my typical programming tasks, which include a wild mix of end user desktop applications, IT staff (command line) utilities, automation software (unattended "get-stuff-from-A-do-B-move-result-to-C-report-to-D") and occasionally a "web application" (simple forms which results most of the time in sending out an email).

I then had a look at various programming languages, including but not limited to Delphi, Python.

The one that stuck out of the heap, enabling me to (continue to) do the jobs listed above without the need to switch to a different language for a certain field, was the .NET family. And while C# is what the "cool guys" do, I'll stick to my BASIC roots and pick VB.NET.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Kenny on August 19, 2015, 03:28:34 PM
Paul,

I fully support that the code you write is yours to do with as you please. And if you choose to keep it private, so be it.  But could you at least explain your reasons or thought process behind your decision to release FFFB as open source, but not FFPB?  I have written some quick and dirty code in my time that was for my personal use.  Lbater I added to it instead of rewriting it.  And ended up with code that I wouldn't let anybody else see just because it was ugly.

I'm not suggesting that this is your reason, but it's the only one I could come up with from my perspective and history.

David
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Chris Maher on August 19, 2015, 03:55:53 PM
Hi Paul,

Not sure of all the implications, but I would be very interested in buying a personal licence to the FF/PB source with no support and appropriate restrictions.

A price of US$50 would not cover its real value, but it could be a small gesture for all your determined efforts with this wider community, especially if others felt the same..

Regards,

Chris.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 19, 2015, 05:13:34 PM
Quote from: David Kenny on August 19, 2015, 03:28:34 PM
I have written some quick and dirty code in my time that was for my personal use.  Lbater I added to it instead of rewriting it.  And ended up with code that I wouldn't let anybody else see just because it was ugly.
That summarizes it pretty well. The code base has morphed over the years and is not up to any standard to be released for general consumption :)

As you can imagine, 12 years ago when FireFly was being written, I was not nearly as competent a coder as I am now. Looking at the code makes me proud in some cases and in other cases leaves me shaking my head thinking 'what in the world was I thinking when I wrote this!'   hahahaha

Over the years portions of the code has been refactored but overall it is still only average at best. Also, my penchant for code commenting was severely lacking in the early days.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Kenny on August 19, 2015, 08:00:06 PM
Well, I can empathize with that.  It still makes me sad, but I understand.  Most of us here know FF's story in that it was written and maintained by one person.  I have always been in awe of that fact, and am sure that others are too.  It is something you should be proud of.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 19, 2015, 08:23:04 PM
Thanks David, that is very awesome of you to say. You put a big smile on my face tonight  :)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Peter Heffernan on August 21, 2015, 06:55:39 PM
Paul,

I'm only a hobbyist when it comes to programming but have appreciated your efforts ever since getting FF & PB.

I fear you're correct re. the death knolls of PB but I've been there before, as I'm sure others on here have been, with VB.

Certainly I have had my worth out of your code and feel that it's entirely up to you how you fly with what you have.

From a $ POV maybe a FF to FB translator would compensate you somewhat, prior to opening up FF to PB as freeware? With something like that in-the works, you obtain the financial credit that you're due and the 'basic community gets to both use your excellent interface and get a 'paid for' option to head towards FB, where they'll probably eventually head towards anyway. If not then, as was mentioned earlier; a 'donate' button would be a must!

Thanks Paul, whatever way you go I'll be tagging along, I'm sure.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Nathan Durland on August 22, 2015, 10:33:13 PM
Paul -- I've bought several copies of several versions of FF.  FF has more than paid for itself; I have no problems with the idea of it going freeware or whatever works best for you).  I like coming here to this forum, because it is filled with people much smarter than me.  Losing the forum would be a blow. 

As for what we are doing now, we still use PowerBASIC almost daily.  We have a couple dozen program we have developed with FF/PB to supplement and complement our ERP system, which are actively maintained and enhanced.  New development of larger projects is with Visual Studio community edition, either VB or C#/  I have to confess that I don't know either of them very well, I leave the projects up to people who work for me.  Still, I occasionally still knock out some one-time use program with PB just because I can be so much faster because I'm so familiar with the tools. 
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on August 23, 2015, 12:54:50 PM
I am still sticking with PowerBASIC, indeed.
I am not selling software anymore. The only programming I do is to create tools for myself.
PB still works for me. And frankly, I am currently not motivated to learn a new programming language. From what I hear, FB borrows  heavily from C(+), including some of the syntax. This does not appeal to me very much.
If I switch to another language, it will probably be PureBasic, unless I hate the VD so much that I see no other choice then to switch to FB so I can still use FF.

Whever I program, I always use FF/PB. I absolutely love FF. If I would decide to go with FB instead of PureBasic, FF would be the only reason.
Regarding making FF/PB freeware .. I don't know. As you said Paul, it will attract some FF newbees and they will come asking for support ...
Making it open source? Who will be brave enough (besides Paul) to start changing FF's source code ..?

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eros Olmi on August 23, 2015, 03:07:05 PM
Ciao Paul,

Like others, I nave no problem in whatever decision you will take for your future. FF gave me back much more of what I payed many years ago.

I'm still with PB in developing thinBASIC programming language and I think I will use it for many years to come. If you do not need any 64bit I think it will remain a great compiler for long time.

Please just consider me if you will decide to sell FF/PB sources. For the kind of programming I do, they would be of immense interest even if you think sources are too much "personal" written to be sold.

Ciao and thanks for all.
Eros
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 23, 2015, 03:47:42 PM
The only thing that I have done with PB since Bob Zale's death is to update my Windows API Headers (bug and typo fixes, no new stuff) and adapt my CSED editor to work with FreeBasic (still a work in progress).

No matter if it will be still usable for x years, it has no future. IMO, it its time to prepare the transition. If you wait until you're forced to use 64-bit, you will have to face the insurmountable task of having to rewrite a big amount of software in a short time.

Bu to each its own. Just don't ask if someone has written a converter.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on August 24, 2015, 04:47:55 AM
I keep using PowerBASIC to maintain my existing DLL(s) for 32-bit applications.
And C++ for all my 64-bit needs (no more headache to figure how to use the latest Windows API).

PowerBASIC produces smaller standalone 32-bit applications than C++.
C++ 64-bit produces faster code, and is always capable of using the latest API additions.

My opinion about FreeBasic and PureBASIC, is that sooner or later they could suffer the same syndrome as PowerBASIC, especially when using DDT like encapsulation, or exotic syntax hard to translate to another language without a good understanding on what they are doing under the hood.

...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 09:21:03 PM
Solved the question of overloaded operators.

Example:


' ========================================================================================
' Returns vbTrue (-1) if the two BSTRings are equal.
' ========================================================================================
OPERATOR = (BYREF pBStr1 AS AfxBstr, BYREF pBStr2 AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(*pBStr1.Handle, *pBStr2.Handle) = 0
END OPERATOR
' ========================================================================================

' ========================================================================================
' Returns vbTrue (-1) if the two BSTRings are not equal.
' ========================================================================================
OPERATOR <> (BYREF pBStr1 AS AfxBstr, BYREF pBStr2 AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(*pBStr1.Handle, *pBStr2.Handle) <> 0
END OPERATOR
' ========================================================================================


Now I can use:


DIM bs1 AS AfxBstr
DIM bs2 AS AfxBstr

bs1 = "Test string 1"
bs2 = "Test string 2"

IF bs1 <> bs2 THEN PRINT "Not equal"
IF bs1 = bs2 THEN PRINT "Equal"


Why the most useful stuff is never well explained in the manual?

Looks like I'm going to be able to write an easy to use BSTR class.

I'm beginning to like this language.

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 10:01:43 PM
Another operator +=


' ========================================================================================
' Appends a string to the BSTR. The string can be a literal or a FB STRING or WSTRING variable.
' ========================================================================================
OPERATOR AfxBstr.+= (BYREF wszStr AS CONST WSTRING)
   this.Append(wszStr)
END OPERATOR
' ========================================================================================

' ========================================================================================
' Appends a BSTR to the BSTR.
' ========================================================================================
OPERATOR AfxBstr.+= (BYREF pBStr AS AfxBstr)
   this.Append(*pBStr.Handle)
END OPERATOR
' ========================================================================================


Usage:


DIM bs1 AS AfxBstr = "Test string"
DIM s AS STRING = " + appended string"
bs1 += s
DIM bs2 AS AfxBstr = " + another BSTR"
bs1 += bs2
print *bs1.Handle

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 10:11:23 PM
Another two operators, "<" and ">":


' ========================================================================================
' Returns vbTrue (-1) if the the first BSTR is greater than the 2nd BSTR; FALSE, otherwise.
' ========================================================================================
OPERATOR > (BYREF pBStr1 AS AfxBstr, BYREF pBStr2 AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(*pBStr1.Handle, *pBStr2.Handle) > 0
END OPERATOR
' ========================================================================================

' ========================================================================================
' Returns vbTrue (-1) if the the first BSTR is less than the 2nd BSTR; FALSE, otherwise.
' ========================================================================================
OPERATOR < (BYREF pBStr1 AS AfxBstr, BYREF pBStr2 AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(*pBStr1.Handle, *pBStr2.Handle) < 0
END OPERATOR
' ========================================================================================


Usage:


DIM bs1 AS AfxBstr = "Test string 1"
DIM bs2 AS AfxBstr = "Test string 2"
IF bs1 < bs2 THEN print "less"
IF bs2 > bs2 THEN print "greater"

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 10:22:46 PM
Adding more overloads:


' ========================================================================================
' Returns vbTrue (-1) if the two BSTRings are equal; FALSE, otherwise.
' ========================================================================================
OPERATOR = (BYREF pBStr1 AS AfxBstr, BYREF pBStr2 AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(*pBStr1.Handle, *pBStr2.Handle) = 0
END OPERATOR
' ========================================================================================
' ========================================================================================
OPERATOR = (BYREF pBStr AS AfxBstr, BYREF wszStr AS CONST WSTRING) AS INTEGER
   OPERATOR = StrCmpW(*pBStr.Handle, wszStr) = 0
END OPERATOR
' ========================================================================================
OPERATOR = (BYREF wszStr AS CONST WSTRING, BYREF pBStr AS AfxBstr) AS INTEGER
   OPERATOR = StrCmpW(wszStr, *pBStr.Handle) = 0
END OPERATOR
' ========================================================================================


Now the comparison can be made with two BSTR, a BSTR and a STRING or WSTRING, or a STRING or WSTRING and a BSTR.

Operators and overloading are marvelous.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on August 24, 2015, 10:58:20 PM
Quote from: Jose Roca on August 24, 2015, 10:22:46 PM
I'm beginning to like this language.
Operators and overloading are marvelous.

:)  It makes me happy hearing you talk like this. FreeBASIC has ignited my programming passion again.

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 11:06:49 PM
More operators:


' ========================================================================================
' Returns vbTrue (-1) if the the first BSTR is greater or equal than the 2nd BSTR; FALSE, otherwise.
' ========================================================================================
OPERATOR >= (BYREF pBStr1 AS CBStr, BYREF pBStr2 AS CBStr) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(*pBStr1.Handle, *pBStr2.Handle)
   IF nResult > 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================
' ========================================================================================
OPERATOR >= (BYREF pBStr AS CBStr, BYREF wszStr AS CONST WSTRING) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(*pBStr.Handle, wszStr)
   IF nResult > 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================
OPERATOR >= (BYREF wszStr AS CONST WSTRING, BYREF pBStr AS CBStr) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(wszStr, *pBStr.Handle)
   IF nResult > 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================

' ========================================================================================
' Returns vbTrue (-1) if the the first BSTR is less or equal than the 2nd BSTR; FALSE, otherwise.
' ========================================================================================
OPERATOR <= (BYREF pBStr1 AS CBStr, BYREF pBStr2 AS CBStr) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(*pBStr1.Handle, *pBStr2.Handle)
   IF nResult < 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================
' ========================================================================================
OPERATOR <= (BYREF pBStr AS CBStr, BYREF wszStr AS CONST WSTRING) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(*pBStr.Handle, wszStr)
   IF nResult < 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================
OPERATOR <= (BYREF wszStr AS CONST WSTRING, BYREF pBStr AS CBStr) AS INTEGER
   DIM nResult AS LONG
   nResult = StrCmpW(wszStr, *pBStr.Handle)
   IF nResult < 0 OR nResult = 0 THEN OPERATOR = -1 ELSE OPERATOR = 0
END OPERATOR
' ========================================================================================

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 11:10:18 PM
What I can't still to figure is an easier way to PRINT the contents of the BSTR than *pBstr.Handle. I can't use @, * or &, and I don't find a suitable operator.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 24, 2015, 11:16:06 PM
Quote from: TechSupport on August 24, 2015, 10:58:20 PM
Quote from: Jose Roca on August 24, 2015, 10:22:46 PM
I'm beginning to like this language.
Operators and overloading are marvelous.

:)  It makes me happy hearing you talk like this. FreeBASIC has ignited my programming passion again.



When I will finish the classes for BSTRings and VARIANTs, COM programming will be less difficult.

I never have been much interested in ActiveX controls (most of them are outdated) except the WebBrowser control, and to host it, the ATL.DLL that comes pre-installed with Windows is enough.

Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Warner on August 25, 2015, 05:07:37 AM
Quote from: TechSupport on August 24, 2015, 10:58:20 PM
Quote from: Jose Roca on August 24, 2015, 10:22:46 PM
I'm beginning to like this language.
Operators and overloading are marvelous.

:)  It makes me happy hearing you talk like this. FreeBASIC has ignited my programming passion again.



Two of the most positive posts I have read for a while. I'm very glad to hear you both talking like this. :)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Knuth Konrad on August 25, 2015, 11:19:53 AM
Quote from: Jose Roca on August 24, 2015, 10:01:43 PM
Another operator +=

Please, please, please never use "+" for string concatenation ...  I know that's what was used in the early (stone-age) BASICs, but "&" has been around for as long as I use BASIC ...

And given BASICs (and VARIANT data type's) intrinsic implicit type conversion, "+" for string concat can lead to hard to debug results ...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 25, 2015, 11:29:21 AM
I'm not using += for string concatenation, but for adding and assign. The & operator is a different animal.

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 25, 2015, 11:41:10 AM
The CBStr class procedure that does the real work is:


' ========================================================================================
' Appends a string to the BSTR. The string can be a literal or a FB STRING or WSTRING variable.
' To append another BSTR:
' DIM bs AS CBStr = "1st string"
' DIM b2 AS CBStr = "2nd string"
' bs.Append *b2.Handle
' ========================================================================================
SUB CBStr.Append (BYREF wszStr AS CONST WSTRING)
   DIM n1 AS UINT = SysStringLen(m_bstr)
   DIM nLen AS UINT = .LEN(wszStr)
   IF nLen = 0 THEN EXIT SUB
   DIM b AS BSTR = SysAllocStringLen(NULL, n1+nLen)
   IF b = NULL THEN EXIT SUB
   memcpy(b, m_bstr, n1 * SIZEOF(WSTRING))
   memcpy(b+n1, @wszStr, nLen * SIZEOF(WSTRING))
   SysFreeString(m_bstr)
   m_bstr = b
END SUB
' ========================================================================================


To use it, you must do:


DIM bs AS CBStr = "1st string"
DIM b2 AS CBStr = "2nd string"
bs.Append *b2.Handle


Overloading the += operator


' ========================================================================================
' Appends a string to the BSTR. The string can be a literal or a FB STRING or WSTRING variable.
' ========================================================================================
OPERATOR CBStr.+= (BYREF wszStr AS CONST WSTRING)
   this.Append(wszStr)
END OPERATOR
' ========================================================================================

' ========================================================================================
' Appends a BSTR to the BSTR.
' ========================================================================================
OPERATOR CBStr.+= (BYREF pBStr AS CBStr)
   this.Append(*pBStr.Handle)
END OPERATOR
' ========================================================================================


Now, we can use:


DIM bs AS CBStr = "1st string"
DIM b2 AS CBStr = "2nd string"
bs += b2

Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on August 25, 2015, 11:55:46 AM
Added the &= operator. It does he same that +=.

I thought that FreeBasic had not the &= operator because I couldn't find it in the index of the help file, where it appears as ?.


' ========================================================================================
' Appends a string to the BSTR. The string can be a literal or a FB STRING or WSTRING variable.
' ========================================================================================
OPERATOR CBStr.&= (BYREF wszStr AS CONST WSTRING)
   this.Append(wszStr)
END OPERATOR
' ========================================================================================

' ========================================================================================
' Appends a BSTR to the BSTR.
' ========================================================================================
OPERATOR CBStr.&= (BYREF pBStr AS CBStr)
   this.Append(*pBStr.Handle)
END OPERATOR
' ========================================================================================

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Pedro Marquez on August 25, 2015, 04:44:56 PM
It will be good an open forum
Title: Re: Are you guys sticking with PowerBASIC?
Post by: John Montenigro on September 02, 2015, 04:58:25 PM
Paul,
I just found out about the updated FF about an hour ago, and I have many questions. But the first order of business is to answer your question from the top of this thread:

Although at one point (20+ years ago!!!), I programmed professionally, it was DOS-based, and I came along to Windows programming with great difficulty. So I'm not the best person to ask about what tools "should" be, but I may be able to answer what works for me.

I'm primarily a Business Analyst, currently engaged in a major business "turnaround", and a small part of my work is to write programs to help eliminate repetitive manual tasks. I'm all over the place, from email to LAN connections, to automating QuickBooks, creating documents via XPRINT and PDF Creator...wherever people get bogged down, I either train them in a better process, or build a tool to overcome an obstacle. My programs are mostly hacks of the disposable kind - they will be replaced at some point in the future, not upgraded. They just have to work for now...

So I have to be able to respond to a problem and produce a working program quickly. PB and FF have always made that possible - and easy - for me. I've used PB since around 1993(?) and FF since about 2004(?), and I am not happy about having to learn another language or toolset. I will go to the ground with PB and FF. When they stop working for me, I won't care about programming anymore.

That said, it intrigues me to hear that you've transitioned to FreeBasic, and I feel compelled to investigate it. I have no idea where to start, what tools I'd need, or how to transition from PB to FB. But I'm willing to explore, experiment, and give it a fair try.

So, my questions:
- Where do I get FB? What's in it? (You don't have to tell me, just point me to good reading materials!)
- What do I do with my current version of FF? Is the new version only for FreeBasic, or both FB AND PB? Is there a cost to get the new FF for FB?
- (For this I probably DO need someone to tell me) What are the differences in capabilities between all my PB code, and what FreeBasic wants to see? What's the "effort index" for converting my PB code to FB? (on a scale of 1 to 10...)

I guess that's it for now. I'm interested, concerned that I won't be able to adapt, and fearful that I'll write worse code than ever!

I want to echo what's been said - how appreciative I am for what you gave us in FF, and how much that has helped me to create solutions for people, to make THEIR lives better; a good thing that has ripple effects far beyond what you can imagine!  So a great big THANK YOU from me (even if you ARE a Dolphins fan!)  ;D

Well, I've rambled on... I hope there's something useful to you in what I've written.

Looking forward to the "next phase"!

-John
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on September 03, 2015, 12:05:27 AM
If you are happy with what you have, my advice is that you should continue using it.

If you really have some interest or curiosity about FreeBasic, just type FreeBasic in Google and you will get all the links that you need: download, documentation, forum, etc. Try it.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: John Montenigro on September 03, 2015, 10:58:11 AM
Hi Jose!

After I wrote that message, my curiosity got the best of me and I did just that - googled FB and started reading...

So...I've downloaded the compiler and tons of manuals/documentation, and will be reading and starting to tinker over the weekend.

Who knows? This might be the start of my programming career - again!

BTW, thank you for all the work you've done with the header files! I have yet to use them to their fullest, but the times I have used them, they have been a fabulous help!

-John
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 03, 2015, 01:05:17 PM
Getting started with FreeBASIC is very easy. As time goes by I hope to create a tutorial of some sorts to help guide former PowerBasic users over to FreeBasic. When the PowerBasic site goes dark forever then you will be thankful that you have an alternative programming language that is pretty familiar to PB.

Download the 32 bit and 64 bit Windows binaries: (don't forget to download the chm Help file also)
http://freebasic.net/get

Download JellyFB Code Editor (I am working on a new open source version of the editor):
http://www.planetsquires.com/jellyfishpro_freebasic.htm

Download FireFly for FreeBASIC (this product is free):
http://www.planetsquires.com/firefly_freebasic.html

FBDebugger (if you want to use a standalone debugger):
http://www.freebasic.net/forum/viewtopic.php?f=8&t=13935

Sign up and browse the FB support forum:
http://www.freebasic.net/forum/index.php

I may at some point open these private forums to the public as well so ex-PBers can at least ask questions to some familiar faces here without feeling intimidated by a new community.

When programming in FB you need to be aware that it is much more strongly typed than PB. It is closer to C/C++ in this regard, mainly because the Windows include headers are translated directly from the C based MinGW headers. Therefore, you need to use types such as HWND, LPARAM, HANDLE, etc rather than simply a DWORD or LONG. If you don't do this then you will simply get a lot of compiler warnings.

I love the fact that the console window exists along side the traditional GUI windows. You simply need to specifiy a compiler command to turn it off. It is great for debugging because you can issue PRINT or ? statements and the text will display in the console window.

Jose is working on some awesome code to make integerating Unicode and COM easier with FB. When he finishes that code then the gap between FB and PB will be negligible.

I am very impressed with FB and every new project that I create is now done using FreeBASIC. FB gets better and better every single day.

:)




Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Kenny on September 03, 2015, 03:44:21 PM
Quote from: TechSupport on September 03, 2015, 01:05:17 PM
I love the fact that the console window exists along side the traditional GUI windows. You simply need to specifiy a compiler command to turn it off. It is great for debugging because you can issue PRINT or ? statements and the text will display in the console window.

Most BASIC's I've ever used have this feature...  I never could understand why PB didn't.  The only reason it didn't drive me crazy enough to give up on PB was the fact that PB compiles soooo fast.  I can test things out with minimal delay (although no delay would have been preferable).
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 03, 2015, 04:04:08 PM
Some months ago, when Paul went for C++, I had my mind set on PureBasic as my future replacement for PB. I played around some with PuBa but never actually started to program in it.
Seeing the recent rising enthusiasm of Paul and Jose about FB, and seeing that Paul really goes for 'FF for FB', I will follow along!

Since I have an ongoing private project written in PB that I continue to improve on, I will keep PB as my main programming language for now, but I will start learning FB too, now I still have a chance to do it at a slow pace.
When the lights really go out at PB, I should be able to switch entirely to FB for new projects.

My main reason to decide this is Paul developing FF for FB. I wrote this months ago, that this would be my motivation to go for FB, so here I am ...  :)

Thanks Paul and Jose for leading the way !!

Kind regards
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 03, 2015, 06:01:25 PM
Quote from: David Kenny on September 03, 2015, 03:44:21 PM
Most BASIC's I've ever used have this feature...  I never could understand why PB didn't. 

Because selling PB Console compiler as a separate product made PB lots more money $$$$. I always felt that having two separate PB products was nothing more than a money grab. It could easily have been one product. Much like selling PB Forms as a separate product. It should have been part of PBWIN.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 03, 2015, 06:03:25 PM
Quote from: Eddy Van Esch on September 03, 2015, 04:04:08 PM
My main reason to decide this is Paul developing FF for FB. I wrote this months ago, that this would be my motivation to go for FB, so here I am ...  :)

Thanks Paul and Jose for leading the way !!

Awesome! Welcome aboard Eddy  :)
With a small investment in learning, I am sure that we all can be just as productive in FB as we were in PB.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 03, 2015, 06:15:03 PM
Don't do twice the same mistake, selecting a compiler that is not widely used, and relying heavily on the work of just a few.

I know a real alternative to PB, but it is not Free ;)

Good luck anyway!
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 03, 2015, 06:23:27 PM
Quote from: Patrice Terrier on September 03, 2015, 06:15:03 PM
Don't do twice the same mistake, selecting a compiler that is not widely used, and relying heavily on the work of just a few.

I know a real alternative to PB, but it is not Free ;)

Good luck anyway!


:)  :)  :)

Title: Re: Are you guys sticking with PowerBASIC?
Post by: David Kenny on September 03, 2015, 06:23:51 PM
Paul,

Sorry, I misread the portion of your post that I based my post on.  :P

I was thinking you meant it had an "immediate" window.  Where you could do "Design Time Expression Evaluation". :)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 03, 2015, 06:33:40 PM
Quote from: Patrice Terrier on September 03, 2015, 06:15:03 PM
I know a real alternative to PB, but it is not Free ;)
It doesn't have to be free, it just mustn't be C ...  (say this out loud and you will get the reason for my bold) ;D

And open source is different from commercial (closed) code ...
There is always a chance that someone is willing to pick up the thread where another left off...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 03, 2015, 07:12:03 PM
Quote from: Eddy Van Esch on September 03, 2015, 06:33:40 PM
There is always a chance that someone is willing to pick up the thread where another left off...

And that is exactly what happened with FreeBASIC. dkl is now the primary coder but there are several other people heavily involved as well behind the scenes. PB was a one man show. FB is not. The FreeBASIC compiler is built using FreeBASIC. I would venture to guess that the code is a hell of a lot easier to pick up and maintain than Bob's million lines of assembly language. Even I can understand FB's code.




Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 04, 2015, 02:29:01 PM
Eddy--

QuoteIt doesn't have to be free, it just mustn't be C ...  (say this out loud and you will get the reason for my bold) ;D

The one i am thinking about, is using a BASIC like syntax very close to PB's, here is a small example easy to understand:
PROCEDURE BassSyncPos(LOCAL nPos is 8-byte int)
K is int
IF BTN_Pause..Visible THEN BassStreamPause() // 09-28-2010
IF gnFlyer THEN
    IF gnFlyerID THEN BASS_ChannelSetPosition(gnFlyerID, nPos, 0)
ELSE
    FOR K = 1 TO MAXCHANNEL - 1
        IF gnChannel[K].ID  THEN
            BASS_ChannelSetPosition(gnChannel[K].ID, nPos, 0)
        END
    END
    nOutMixer is int = ZSL_GetBassOutMixer(); IF nOutMixer THEN BASS_Mixer_ChannelSetPosition(nOutMixer, nPos, 0)
END
IF BTN_Pause..Visible THEN BassStreamResume() // 09-28-2010
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 04, 2015, 05:31:45 PM
hi Patrice,

Well that code looks pretty "BASIC'ish". No need to be embarrased. You are among friends. Just tell us what compiler that is ...
Oh, and you can tell us other (personal) secrets too if you like ... We like to gossip ...  ;D   :o
just kidding .... don't want to scare you ....  ;)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: James Fuller on September 04, 2015, 05:54:52 PM
I believe it's this:
http://www.windev.com/

a bit pricey :)

James
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 04, 2015, 06:00:56 PM
Quote from: James Fuller on September 04, 2015, 05:54:52 PM
I believe it's this:
http://www.windev.com/
And if their main developer jumps under a train we are still in business ..?  ;D
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 04, 2015, 06:36:50 PM
890 â,¬ when you buy it in concurent mode, you just have to give them a proof that you are using another compiler.

For me the word pricey, means nothing until you know all what you can do with it.
So easy to create a mockup, you just have to drag controls on the form(s), but you can also program in low level SDK mode if you want to, including something like this:

//+--------------------------------------------------------------------------+
//|                                GoldFish                                  |
//|                                                                          |
//|                   Example of 32-bit layered animation                    |
//|                                                                          |
//| This is a SDK FLAT API transposition of a C# project written by Davidwu  |
//|                            www.cnpopsoft.com                             |
//|                                                                          |
//+--------------------------------------------------------------------------+
//|                                                                          |
//|                         Author Patrice TERRIER                           |
//|                            copyright(c) 2008                             |
//|                           www.zapsolution.com                            |
//|                        pterrier@zapsolution.com                          |
//|                                                                          |
//+--------------------------------------------------------------------------+
//|                  Project started on : 09-23-2008 (MM-DD-YYYY)            |
//|                        Last revised : 09-23-2008 (MM-DD-YYYY)            |
//+--------------------------------------------------------------------------+

CONSTANT
  MAX_PATH             = 260
  ERROR_ALREADY_EXISTS = 183
  AC_SRC_OVER          = 0x00
  AC_SRC_ALPHA         = 0x01
  SW_SHOW              = 5
  SW_RESTORE           = 9
  WM_DESTROY           = 0x0002
  WM_NCHITTEST         = 0x0084
  WM_KEYDOWN           = 0x0100
  WM_TIMER             = 0x0113
  HTCAPTION            = 2
  WS_POPUP             = 0x80000000
  WS_EX_TOPMOST        = 0x00000008
  WS_EX_LAYERED        = 0x00080000
  CS_VREDRAW           = 0x0001
  CS_HREDRAW           = 0x0002
  CS_DBLCLKS           = 0x0008
  PM_REMOVE            = 0x0001
  ULW_ALPHA            = 0x00000002
  SM_CXSCREEN          = 0
  SM_CYSCREEN          = 1
  IDC_ARROW            = 32512
 
  GDI32                = "GDI32"
  USER32               = "USER32"
  GDIPLUS              = "GDIPLUS"
  GDIMAGE              = "GDIMAGE"
END

POINTAPI is structure
  x is int   // long x
  y is int   // long y
END

SIZEL is structure
  cx is int   // long x
  cy is int   // long y
END

RECT is structure
  nLeft   is int   // long Left
  nTop    is int   // long top
  nRight  is int   // long Right
  nBottom is int   // long bottom
END

SECURITY_ATTRIBUTES is structure
  nLength              is int   // DWORD nLength
  lpSecurityDescriptor is int   // LPVOID lpSecurityDescriptor
  bInheritHandle       is int   // BOOL bInheritHandle
END

TagMSG is structure
  hWnd    is int      // HWND hwnd
  nMessage is int     // UINT Message
  wParam  is int      // WPARAM wParam
  lParam  is int      // LPARAM lParam
  nTime    is int     // DWORD time
  pt       is POINTAPI  // POINT pt
END

BITMAP is structure
  bmType       is int     //Type C : LONG
  bmWidth      is int     //Type C : LONG
  bmHeight     is int     //Type C : LONG
  bmWidthBytes is int     //Type C : LONG
  bmPlanes     is 2-byte int  //Type C : WORD
  bmBitsPixel  is 2-byte int  //Type C : WORD
  bmBits       is int     //Type C : LPVOID
END

BLENDFUNCTION is structure
  BlendOp             is 1-byte int
  BlendFlags          is 1-byte int
  SourceConstantAlpha is 1-byte int
  AlphaFormat         is 1-byte int
END

WNDCLASSEXA is structure
  cbSize        is unsigned int //Type C : UINT
  style         is unsigned int //Type C : UINT
  lpfnWndProc   is int      //Type C : WNDPROC
  cbClsExtra    is int      //Type C : int
  cbWndExtra    is int      //Type C : int
  hInstance     is int      //Type C : HINSTANCE
  hIcon         is int      //Type C : HICON
  hCursor       is int      //Type C : HCURSOR
  hbrBackground is int      //Type C : HBRUSH
  lpszMenuName  is int      //Type C : LPCSTR
  lpszClassName is int      //Type C : LPCSTR
  hIconSm       is int      //Type C : HICON
END

BITMAPINFOHEADER is structure
  biSize          is int
  biWidth         is int
  biHeight        is int
  biPlanes        is 2-byte int
  biBitCount      is 2-byte int
  biCompression   is int
  biSizeImage     is int
  biXPelsPerMeter is int
  biYPelsPerMeter is int
  biClrUsed       is int
  biClrImportant  is int
END

RGBQUAD is structure
  bBlue     is 1-byte int
  bGreen    is 1-byte int
  bRed      is 1-byte int
  bReserved is 1-byte int
END

BITMAPINFO_API is structure
  bmiHeader is BITMAPINFOHEADER //BITMAPINFOHEADER est une autre structure
  bmiColors is RGBQUAD      //RGBQUAD est une autre structure
END

GdiplusStartupInput is structure
  GdiplusVersion is int             // Must be 1
  DebugEventCallback is int         // Ignored on free builds
  SuppressBackgroundThread is int   // False unless you//re prepared TO call
  SuppressExternalCodecs is int     // False unless you want GDI+ only TO Use
END

gnToTheRight, gnFrame are int //  To store SetImage static values

gsIMAGE_FullPathName is string = CompleteDir(fExeDir()) + "GoldFish.png"
gnFRAME_SizeX is int = 84 // Must match the animation frame width
gnFRAME_SizeY is int = 84 // Must match the animation frame height
gnFRAME_Count is int = 20 // The frame number
gnUSE_StepX   is int = 3  // X step value in pixel
gnUSE_StepY   is int = 1  // Y step value in pixel

LOCAL
IF LoadDLL(GDIMAGE) THEN

  // The WinMain section
 
  nRet, x, y are int
  wc is WNDCLASSEXA
  zClass is string ASCIIZ on 16 = "ZANIMATION"
  wcStyle is int = CS_HREDRAW + CS_VREDRAW
  IsInitialized is int = API(USER32, "GetClassInfoExA", Instance, &zClass, &wc)
  IF IsInitialized = 0 THEN
    wc.cbSize        = Dimension(wc)
    wc.style         = wcStyle
    wc.lpfnWndProc   = &WndProc
    wc.cbClsExtra    = 0
    wc.cbWndExtra    = 0 // Extend_cbWndExtra * 4
    wc.hInstance     = Instance
    wc.hIcon         = API(USER32, "LoadImageA", Null, "GoldFish.ico", 1, 0, 0, 0x00000010 + 0x00000040)
    wc.hCursor       = API(USER32, "LoadCursorA", Null, IDC_ARROW)
    wc.hbrBackground = Null
    wc.lpszMenuName  = Null
    wc.lpszClassName = &zClass
    wc.hIconSm       = Null
    IF API(USER32, "RegisterClassExA", &wc) THEN IsInitialized = True
  END
 
  IF IsInitialized THEN
    x = Max((API(USER32, "GetSystemMetrics", SM_CXSCREEN) - gnFRAME_SizeX) / 2, 0)
    y = Max((API(USER32, "GetSystemMetrics", SM_CYSCREEN) - gnFRAME_SizeY) / 2, 0)
   
    hMain is int = API(USER32, "CreateWindowExA",   
    WS_EX_LAYERED,            // SDK extended style
    zClass,                   // Set this one to your default path name
    "GoldFish",               // Caption
    WS_POPUP + WS_EX_TOPMOST, // SDK style
    x,                        // X location
    y,                        // Y location
    gnFRAME_SizeX,            // Control width
    gnFRAME_SizeY,            // Control height
    Null,                     // Parent handle
    0,                        // Control ID
    Instance,                 // Instance
    0)
   
    IF hMain THEN
     
      Msg is TagMSG
      SetImage(hMain, gsIMAGE_FullPathName, 255)
      API(USER32,"ShowWindow", hMain, SW_SHOW)
     
      IF gnFRAME_Count > 1 THEN API(USER32, "SetTimer", hMain, 1, 50, Null)
      WHILE API(USER32, "GetMessageA", &Msg, Null, 0, 0)
        API(USER32, "TranslateMessage", &Msg)
        API(USER32, "DispatchMessageA", &Msg)
      END
      IF gnFRAME_Count > 1 THEN API(USER32,"KillTimer", hMain, 1)
     
      nRet = Msg:wParam   
     
    END
   
  END
 
END


And you can intermix it with any 32-bit or 64-bit DLL(s) written in PB or C++.

See the attached screen shot of the latest application (ProBand) i wrote with WinDev for a music company in the UK.

You can learn more about ProBand from this link:
http://svc.flyworship.com/WD190AWP/WD190Awp.exe/CONNECT/ProBand
The web site should be completed and fully operationnal by the end of september.

And here is a link to a 64-bit application i wrote with WinDev and GDImage,
http://www.zapsolution.com/preview/Accordion64.zip
that will show you why WinDev could become your best friend...


Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 04, 2015, 06:56:13 PM
Forget to say that the ProBand web site is also written in WinDev, as well as the back office and paypal secure payment, go figure.  8)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 04, 2015, 08:38:10 PM
Patrice,
I am always open to new suggestions.
Why in particular should we consider WinDev before FF/FB?
Does it have a Visual Designer that can compete with FF?
How about string handling functions?
Enquiring minds want to know ...  Dooohhhhh!!!!! I didn't want to say that !!!  ;)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 05, 2015, 06:13:49 AM
Eddy

Their visual designer takes its origine into PC-Soft HIGH SCREEN that was created 25 years ago in DOS days (for me it is just years light ahead of everything else, once you get familiar with it).

When i need to write a small 32-bit DLL, then i keep using PowerBASIC.
When i need to write 32/64-bit DLL(s) then i am using Visual Studio C++.
When i need to write visual applications with hundred of child controls then i am using WinDev.

String handling is a breeze: string, unicode, asciiz, html.
Example:
nInt32 is int = 32
nInt64 is system int = 64
sString is string = "WinDev can produce " + nInt32 + " or " + NumToString(nInt64) + "-bit code"

but you can also write:
sString is string = "WinDev can produce "
sString += NumToString(nInt32) + " or " + NumToString(nInt64)
sString = sString + "-bit code"

Note: Because WinDev is p-code (like .NET), it couldn't be used to produce native DLL.

...

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Anand Kumar on September 06, 2015, 03:36:48 AM
I have moved to WinDev from the beginning of this year.  I have lots of code written in PB but I don't think that I will migrate any of it.  They have served their purpose and its time to look at a completely different field of application. 

Best Regards
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 06, 2015, 07:30:40 AM
Anand--

The main problem with WinDev (for people coming from PB, or SDK coders) is the learning curve.
At first, after 2 weeks using it, i was close to give up, because it was so different to what i was accustomed to.

And indeed it tooks me 3 monthes to master the beast, but now i can do in only one week, things that would have taken me monthes to write in PB or C++.

The ease of creating a complex GUI window form is unbelievable, and i can concentrate my SDK expertise to speed up the code, or to work around the existing bugs (because WinDev, like most languages, is not 100% bug free).

The debug facilities are also just amazing, compared to everything else i have used. And my zTrace utility (http://www.jose.it-berater.org/smfforum/index.php?topic=3092.0), has been modeled on the WD built-in TRACE function.

In the long run, the hability to reuse large blocs of code, helps me to further reduce the development cycle.

...



Title: Re: Are you guys sticking with PowerBASIC?
Post by: Anand Kumar on September 06, 2015, 09:49:23 AM
Patrice,

I don't find the change to be a big problem.  It is a necessity considering the multi platform needs that I am encountering for the past couple of years. 

My company expects my software to work in Windows (32/64), Linux, Mac, iPhone, iPad, Windows Phone, Windows Tablet, Android Phone/Tablet, Regular web, Mobile web and in my organization's private Cloud. 

It is also increasingly getting difficult to get resources to develop software in all these platforms.  We had a requirement from a client for a iPad based solution and by the time the solution was built and delivered, the client switched to Surface Pro making our solution completely useless. 

I know that WinDev will open up new avenues for us.  I am used to the Visual Studio environment so I didn't find it too complicated to switch.  It is indeed a new learning exercise but I think that considering the ROI, it is necessary. 

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 06, 2015, 12:37:14 PM
Anand--

I am confident that you have selected the right tool, especially if you want to target all the platforms you have enumerated. For professional it is a real time saver, and we should all know that time is money, except for the hobyists. ;)

And because you are also a C++ programmer, let me say that the core WinDev API is written with it, so no risk of dead end, like with PB.

Does you, as a scientist, and Anand Ar (working in the Tata Research Development & Design Centre) are the same person?

...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Anand Kumar on September 06, 2015, 01:47:47 PM
Yes Patrice.  I am the same person.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on September 07, 2015, 10:01:59 PM
Quote
Don't do twice the same mistake, selecting a compiler that is not widely used, and relying heavily on the work of just a few.

VB6 was very widely used and had behind it a very big organization... There are no guarantees.

Besides, choosing PB was not a mistake. It has served me very well during many years.

FreeBasic is very similar to PowerBASIC in many ways. For a PB SDK programmer it should very easy to learn. Just get used to stricter type checking and heavy use of pointers (in their translated headers they have chosen to declare almost anything as BYVAL PTR instead of BYREF).

What I don't like is the lack of dynamic unicode strings. There are also difficulties to use COM, but very few PBers use COM anyway, and for what they have been using PB's classes, the FB ones are more convenient.

What I would like to know is how many people here are interested in FB and if they are doing something with it or just lurking.


Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 07, 2015, 11:09:45 PM
Quote from: Jose Roca on September 07, 2015, 10:01:59 PM
What I would like to know is how many people here are interested in FB and if they are doing something with it or just lurking.

That would be great information to know. I am using FreeBASIC for 100% of all my new projects. I am already just as productive in FB as I was in PB. The learning curve was not difficult at all.

As soon as I finish my new FB grid control then I will have just about all the tools I need for FB.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 08, 2015, 04:37:59 AM
Quote from: Jose Roca on September 07, 2015, 10:01:59 PM
What I would like to know is how many people here are interested in FB and if they are doing something with it or just lurking.
I started studying the FB help file (looking for more tutorials). The more I look at FB, the more I like it. The difference in syntax will not be a problem.
Some of the graphics programs (from the forums) are really impressive, speedwise. So FB looks performant enough (so far) for my purposes.

Probably the step from PB to FB is not as big as I had expected. I do need to start looking into OOP because I have never used it in PB too. So I am not yet familiar with the OOP terms...
Also I probably will 'run into' SDK a little more than I did in PB. I am hoping that FireFly can protect me for the most part from SDK ...  :)
If I start a new software project, it will be in FF/FB. Even if it was just for practice.

Besides 'profiting' from Pauls and Joses experience with FB, the FB forum itself seems very much alive and plenty of helpful people there ... So plenty of support ...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 08, 2015, 04:40:39 AM
Quote from: Jose Roca on September 07, 2015, 10:01:59 PM
What I would like to know is how many people here are interested in FB and if they are doing something with it or just lurking.
How about setting up a poll with all the questions that you are interested in....
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 08, 2015, 05:44:37 AM
Jose--

QuoteVB6 was very widely used and had behind it a very big organization... There are no guarantees.
This is not a good comparison, because VB was just a branch of the many languages produced by Microsoft. And since they selected C and C++ to write the Windows OS, it was obvious that VB was not anymore their moto.

Things are very different for PC-Soft or any other providers that have their own line product, in that case the size of the company does matter, and as long as a it makes good money there is always a future for it.

My personnal decision was to select a tool that could be used on several platforms, especially since Android becomes so popular. Thus C/C++ (and WinDev) made the point for me. And i did the same with graphics, where i selected OpenGL, because it is the only graphic environment that is available on all platforms.

Professionnal programming recruitment here in France, is always for C/C++ and WinDev, no more VB or BASIC like jobs, and even less for any PB/PB or FB, it is why i call them dead end, and for those wanting to make a living of their work, they must swim with the flow rather than against it.

Just try to be better than your competitors, that's the deal. :)

...


Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 08, 2015, 06:07:24 AM
Quote from: Patrice Terrier on September 08, 2015, 05:44:37 AM
...and for those wanting to make a living of their work, they must swim with the flow rather than against it.
Patrice, I agree with you on that one. As a professional programmer, your objectives and goals can be (very) different from programmers who do not program for a living, or who only write personal tools to help with their (non-programming) day job.
So I think: different objectives, different tools ...  :)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 08, 2015, 06:53:21 AM
QuoteSo I think: different objectives, different tools ...
This is the reason why i wrote, that for hobyist time is not money.

But when you are not your own boss, or if you have to write commercial applications, or work for a "commanditaire", then you have to be pragmatic, and choose tools that are widely used.  8)

...
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Marc Pons on September 08, 2015, 12:33:24 PM
Just some comments :

I've discorered PowerBasic and FreeBasic only 4 years ago, at that time I was only interrested on making dlls to speed vb6 applications, the 2 languages have similar synthax and not so far from vb6
In most case i've used PB because of the speed , the string functions and also easier COM interfacing.

Now i only use FreeBasic with/without FireFly because i've developped my own c string lib and adapted some COM interface to my needs.

I also do some static libs in c ( by still don't like that boring synthax) , and its also why freebasic is for me  the best choice it can also link to c static libs from the gcc word.

If I was a software company boss, it would be different : i mainly consider c/c++,  but not only from the last 2 years , at least from 15/20 years...
But if it was the case, I would not spend my time on the PB/FB forums argumenting how good is c/c++ !

my conclusion : for my needs , tools/little applications FreeBasic is just what I need ,with Firefly to take care of the repetitive sdk code, better (thanks Paul), and now with Jose in board for unicode / COM : Great !

If Freebasic finishs it will be time to go to C/C++ , the strict typing of freebasic will help to make the jump easier ( but honestly, I will always try to avoid  the   ; {...  )
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Knuth Konrad on September 09, 2015, 09:45:04 AM
Quote from: Patrice Terrier on September 08, 2015, 05:44:37 AM
Things are very different for PC-Soft or any other providers that have their own line product, in that case the size of the company does matter, and as long as a it makes good money there is always a future for it.

But then again looking at the downfall of Borland, that's not necessarily true either.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Patrice Terrier on September 09, 2015, 11:40:14 AM
You may think whatever you want, however having the two feet into one single shoe, has never helped anybody to win a race.

I am just trying to give an advice to those guys sticking with PowerBASIC (the topic of this thread).
And from all the languages i tried, the WinDev's syntax is the closest to PowerBASIC, easiest to learn especially for those not comfortable with the core Windows API.
The language encapsulation itself, is much more powerful than DDT.

Over the years, some formal PB's programmer have followed my advice (especially those coming from a VB background), and now they are all close friends...
And because i know some of you, from a very long time, this is the reason why i am sharing my thought here.

...

Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on September 09, 2015, 11:50:54 AM
Quote from: Patrice Terrier on September 09, 2015, 11:40:14 AM
.... this is the reason why i am sharing my thought here.
I appreciate this, Patrice. The more first-hand experiences we hear (about which-ever compiler), the easier it becomes to make an informed decision! (which each must make for its own).
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Nathan Durland on September 11, 2015, 09:26:22 PM
Quote from: Jose Roca on September 07, 2015, 10:01:59 PM
What I would like to know is how many people here are interested in FB and if they are doing something with it or just lurking.

I'm tinkering with FB at home when I have free time, but I won't be able to put much into it until I figure out how to use SQLTools with it.  90%+ of the code we write/maintain at work interfaces with a database, so SQT is a must.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on September 11, 2015, 11:54:58 PM
Hi Nathan, I helped Klaas Holland interface to SQLTools. I wrote a simple BSTR string class (called aString) because you need BSTR's when calling the PB DLL's. Check out this thread http://www.planetsquires.com/protect/forum/index.php?topic=3677.0

Instead of my aString class you should now use Jose's more powerful CBSTR string class.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: José Roca on September 12, 2015, 01:05:37 AM
> Instead of my aString class you should now use Jose's more powerful CBSTR string class.

Probably not. My class works with Unicode BSTRINGs, not ansi BSTRINGs.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Klaas Holland on September 12, 2015, 05:48:57 AM
Hi Nathan,
When you are interested I can send you some code to work with SQLTools and MySQL e.g.


    Dim IRT     as InkRegelType
    Dim St      as aString

    FF_ComboBox_ResetContent Combo

    St = "SELECT * FROM InkRegels WHERE Voorraad <> 0 AND Artikel = " + Format$(ArtNr)

    SQL_Stmt IMMEDIATE, St.handle
    Do
        If SQL_Fetch <> SQL_SUCCESS Then Exit Do

        St.handle = SQL_ResColString(1) : IRT.IdNr     = st.text
        St.handle = SQL_ResColString(7) : IRT.BatchNr  = st.text
        St.handle = SQL_ResColString(8) : IRT.Voorraad = st.text



to get your information out of the Database.

Klaas
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Theo Gottwald on September 14, 2015, 08:34:38 AM
At this time i will stick with PB because using it, i come from A to B.
And that is currently all i need.
If it comes to x64, FB will beworth a look, while i think in x64 some features are incomplete, for example the inline-ASM ?

Paul, how about to make your forums public?

Thinking about PB, the String-Engine was the part that saved most time compared to other languages.
Therefore to make something like that is a good idea.

If it would accept strings in a 64 bit lenght for 64 bit it would be interesting for me.
For larger Data applications.

I installed the FB, realized that it tries to pirate the ".bas" ending (which is reserved for PB currently) and did not yet really use it.
Also looking in the developers log for next bugfixes was no so impressive from my standpoint as an outsider.
As said, if it would be interesting, then only 64-bit with 64 bit features, like 64-bit Inline ASM, 64-bit Strings.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Martin Francom on November 04, 2015, 01:46:15 AM
Paul,
   My express my thanks to you for FireFly.  It was the most important programming tool that made my Apothesoft pharmacy program possible.  I will continue with FF & PB for the foreseeable future. I am not at all interested in having to learn a new programming language.  My program is stable and when it no longer meets my customers needs, I will fully retire.
   Best wishes to you.
....Marty
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Paul Squires on November 04, 2015, 09:22:22 AM
Thanks Marty,

Oh, you need to make one more forum post. You are now at "666" forum posts. Yikes!  :)
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Klaas Holland on November 05, 2015, 09:02:20 AM
Marty,

The switch from FF-PB to FF-FB does not need to learn another programming language, just another very similar dialect.
As a matter of fact, when you use FF, only the compiler is changed.

Klaas
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Richard Kelly on November 07, 2015, 05:49:46 AM
I've got a lot of mileage sunk into PB and Jose objects and until I need 64 bit, I'm hanging onto PB.

Rick Kelly
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Stephane Fonteyne on February 08, 2016, 01:53:28 PM
Quote from: Marty Francom on November 04, 2015, 01:46:15 AM
Paul,
   My express my thanks to you for FireFly.  It was the most important programming tool that made my Apothesoft pharmacy program possible.  I will continue with FF & PB for the foreseeable future. I am not at all interested in having to learn a new programming language.  My program is stable and when it no longer meets my customers needs, I will fully retire.
   Best wishes to you.
....Marty

If you create GUI applications then you can use Resource Builder v3.0. It creates resources that you can implement in PowerBasic v10.0 compiler. I use this tool because FireFly SDK Visual Designer is discontinue
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Jean-pierre Leroy on February 09, 2016, 02:59:16 AM
Quote
I use this tool because FireFly SDK Visual Designer is discontinue
Dear Stephane,

I don't think it is fair to say that. You know like me that FireFly for PowerBASIC is a fantastic visual designer for Windows; it is so powerful, flexible and at the same time so easy to use; now that there are some lights at PowerBASIC Inc., I hope that Paul will be motivated to restart selling and updating FireFly for PowerBASIC.

Personnaly, "FireFly for PowerBASIC" is still my primary development tool with SQLitening.

Regards,
Jean-Pierre
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Eddy Van Esch on April 07, 2017, 09:39:23 AM
Hi all,

I just 'discovered' the Python programming language a few days ago. I am giving it a testrun now.
The reason it drew my attention is because 2 other software packages that I sometimes use referred to it. The one, FreeCad (an open source CAD modelling software) is written in Python and also handles Python scripts.
The other is a stock trading platform that just recently got a Python API.

Python is a cross-platform interpreted language, so no speedking. That's okay because I don't intend to use it as a PowerBASIC replacement. Just as another tool in my toolbox.
That said, it has a wealth of libraries available. Many of them are written (and compiled) in C/C++, so that makes up a good deal for the lack of speed of the interpreted code.
It also has dynamic variable typing. Some consider this an advantage. I would rather see a Python equivalent of '# Dim All'...  :)

Python itself does not come with a GUI framework. You have to make a choice from a series of possible GUI framework candidates. For the moment I have Python installed, together with Qt and PyQt (the interface between Python and Qt).
As IDE I use Eric6, which also uses Qt. So integration with Qt should be quite good.

I have only just started to read the Python manual and typed in little more than a Print("Hello World!") so I am not yet able to answer difficult questions regarding Python ....  :)

https://www.python.org/

Kind regards
Title: Re: Are you guys sticking with PowerBASIC?
Post by: Knuth Konrad on May 08, 2017, 12:49:14 PM
Python came to my attention when I found out that good parts of my then MMO EVE Online were coded in it. CCP hf (the makers of EVE Online) even enhanced (Stackless) Python performance-wise and contributed back to it: https://stackless.readthedocs.io/en/2.7-slp/stackless-python.html.

What I found a bit weird is the fact that indentation controls code blocks and that therefore it's crucial that tabs and spaces aren't mixed up (and all participants agree on the same tab size, i.e. 2, 3, 4 spaces.

Not sure if that's still correct though.
Title: Re: Are you guys sticking with PowerBASIC?
Post by: James OShea on May 17, 2017, 09:38:50 PM
Quote from: Jean-pierre Leroy on February 09, 2016, 02:59:16 AM
Quote
I use this tool because FireFly SDK Visual Designer is discontinue
Dear Stephane,

I don't think it is fair to say that. You know like me that FireFly for PowerBASIC is a fantastic visual designer for Windows; it is so powerful, flexible and at the same time so easy to use; now that there are some lights at PowerBASIC Inc., I hope that Paul will be motivated to restart selling and updating FireFly for PowerBASIC.

I agree and am also hopeful.

PB and Firefly are both stable releases. Have been for years.  There is no reason to not use Firefly, just like there is no reason not to use PB (when 64 bit programs are not required).

I hadn't done much programming in the past few years but now have the time and opportunity to get back into it.  I was looking at Xojo, which I like, but I like Firefly (with PowerBasic) so much better.  Firefly is as great as I remembered and using it mostly came back to me fairly quickly.