Theo's Forum

IT-Consultant: James C. Fuller => bc9Basic => Topic started by: James C. Fuller on March 01, 2016, 02:09:34 PM

Title: Why bc9Basic
Post by: James C. Fuller on March 01, 2016, 02:09:34 PM
Why bc9Basic?

For me it's the versatility it offers.
As IT Consultant Patrice has pointed out in many posts, C++ is THE definitive language. IT Consultant Fred (the minimalist)  posts pages upon pages of very informative information tracing his foray into the language.

I dislike the C/C++ nomenclature with all it's semi-colons and braces. I was introduced to coding using BASIC and have always preferred it. Also note this is a translator not a compiler or interpreter.

With bc9Basic I can have the power of c++ using a BASIC syntax.
bc9Basic is NOT a beginners language. You do need at least some knowledge of c/c++ to take advantaged of it's assets.

With bc9Basic and the batch files included with the package:
  I can produce c or c++ code
    32 or 64 bit (I personally do not code in 32 bit anymore) with just a -m32 or -m64
      exe (console or gui),dll,obj,lib
      MFC or SDK (MFC is minimal on lack of knowledge on my part. VS only)
  features
    Optional parameters for "c" code akin to c++.
    Ansi or Unicode from the same basic source.
    Window/Dialog creation and message loop encapsulation
    C++ classes
    C++ STL constructs to die for :)
       vectors
       Range based For loops
       auto var declaration
       string/wstring
       regexp (although I use the pcre library)
 
Tested Compilers with supplied batch files for compiling:
    PellesC (c) (32 & 64)
    TinyC (c) (32 & 64)
    TDM-GCC (c/c++) (32 & 64) My current favorite   
    Nuwen (c/c++) (64 only)
    Visual Studio 2015 community (c/c++) (32 & 64)

James



Title: Re: Why bc9Basic
Post by: Theo Gottwald on March 01, 2016, 05:59:46 PM
Can you post some small sample Algos in bc9 Basic?
For example some easy sorting or mathematics algos and maybe a hello world.
How does it behave witH API / COM Calls ?
Title: Re: Why bc9Basic
Post by: James C. Fuller on March 01, 2016, 09:35:55 PM
Theo,
  Thanks to your request I discovered a significant bug in the latest release when compiling using Visual Studio 2015 Community.
I default to adding olepro32.lib as one of the libraries to link. It does not exist for 64 bit and as far as I can tell it was for pre XP OS's.
My gcc distros have it for 64 bit but I still need to update bc9Basic first.

James

Title: Re: Why bc9Basic
Post by: Frederick J. Harris on March 06, 2016, 01:31:28 AM
Quote
I default to adding olepro32.lib...

Can't say as I recall using that lib.  For the things I work on all I ever seem to need are ole32, oleauto32, and uuid.lib.  Perhaps its something old James?

Title: Re: Why bc9Basic
Post by: James C. Fuller on March 06, 2016, 11:25:25 AM
I found out that olepro32.lib is just for compatibility with older Windows versions. pre XP ?
I was surprised I did not catch it until now what with all the testing I do???

James
Title: Re: Why bc9Basic
Post by: Theo Gottwald on March 06, 2016, 11:47:07 AM
I doubt that even XP does need to be supported at this time.
Title: Re: Why bc9Basic
Post by: James C. Fuller on March 06, 2016, 02:01:59 PM
Theo,
  I do not test on/for XP but my translator should run fine on it. I compile bc9Basic as a 32bit app with the TDM-GCC compiler. Visual Studio dropped default XP support several versions ago. It can still be done but it takes more effort that I am willing to do. Also most of my testing is 64bit.

James