No announcement yet.

Advantages over C/C++?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Advantages over C/C++?

    A number of people insist that PowerBasic is far and beyond better than C++ or C, but I don't understand why...
    Is this not true, or is it just only true in certain cases? Any experienced PB users mind sharing some favorite features of theirs that I might not know about?
    I use C++'s templates and classes a lot, along with inline functions and function pointers, for code reuse, and as far as I know PB doesn't have any of those so it seems like it would be a waste of time for me.
    But if PB has comparable features it might be worth the cash to buy it since I'm still pretty slow as far as writing C code goes.



  • #2
    Is anyone fast at writing in C?
    (without extensive pre-written libraries)

    Kind Regards


    • #3
      Hi K,

      Firstly, thanks for dropping by and asking for opinions rather than dismissing the suggestion out of hand... it shows us that you are serious about your choice of programming language... which makes you very welcome here!

      However, rather than dealing with a feature versus feature analysis (which is rarely straightforward when comparing disparate programming languages), I'd suggest that you start off by downloading the example file set for PB/Win 7.0 and taking a look at the code you see there (executable versions of the source are also included so you can gen an idea of code speed/size attributes too). The examples can be downloaded from

      If it looks like you can relate to and follow the code ok, then PowerBASIC might be a good choice for you.

      And if you have any additional questions after the code review, we'll be more than happy to answer any you may pose...

      Thanks for asking!

      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      mailto:[email protected]


      • #4

        They tend to be different animals, C/C++ is an old language that
        has been around long enough to have a massive body of libraries
        available for it so it does have an advantage there.

        PowerBASIC is a language that has unusual features for a dialect
        of basic which includes a lot of low level capacity as well as a
        very good inline assembler so you can perform a lot of low level
        performance based stuff if you need it.

        On avergage you will code complex stuff faster in PowerBASIC than
        in C/C++ if it does not entail prebuilt code that you can just
        plug in. PowerBASIC has a initial advantage in size that is very
        hard to beat with anything else than an assembler and if you
        understand the dialect properly, the performace is there as well.

        It depends on the style you code, if you tend to like freestyle
        coding and don't want to use an assembler, PowerBASIC allows you
        to code in more or less whatever style you like so you have
        considerable design freedom to take advantage of if you need it.


        [email protected]

        hutch at movsd dot com
        The MASM Forum


        • #5

          First, why not use both as I do. Since most of my programming
          is in CAD, I use C/C++, for my other stuff I use PB.

          Second, yes PB does inline with new macros in PB7. I Still use
          PB6 but these function the same as short inlines.

          Third, yes PB does function pointers much easier than C/C++,
          just use, pcode = codeptr(func). That simple!

          Fourth, you WILL NOT FIND a forum that responds and helps as
          fast as this one, just no comparison. So what are you waiting
          for, get PB today and see how easy and powerful it is!




          • #6
            Most people are talking about code, this where PB does great.
            However, PB can not be compared to a cbuilder for example.

            A tool like cbuilder has simply more to offer.
            I find c code very annoying, did some c coding, i don't like it.
            But that's still no comparisation is it?



            • #7
              C++ is Chinese, BASIC is English..

              IMO, PowerBASIC excels when it comes to string and array handling. It
              used to be like the missing link between VB and C++, that is, it gave
              (gives) VB developers a chance to create lean and fast PB DLL's for
              their otherwise rather slow and extremely bloated VB stuff.

              Is how I used it to write VB3 app's and utilities that often beat C++
              app's in speed. C++ fellows scratched their heads - it couldn't be..

              But, today PB has grown to become a complete 32-bit development tool for
              Windows, so now VB is no more needed. PB is no longer just a "missing link",
              it stands steadily on its own three feet.

              In my opinion, there is no such thing as "better than". Only different.
              I sometimes jump between PB, VB and Delphi, and on rare occasions I have
              to try to understand C++, and for me, PB is always the one that gives me
              best results in fastest way. But that is me, can't speak for others..



              • #8
                "Better than" = if developing time is decreased and profit is depending on result.



                • #9
                  From personal experience in custom software development for a
                  number of years, I have found that , IMO, it is best to find a
                  single programming language and become proficient in that, rather
                  than attempt to use multiple languages. The old saying of
                  "jack of all trades, but expert at none" seems to apply to

                  Now each programmer needs to use a language that comes "natural"
                  to them and while many like C, there are many programmers that
                  simply hate the syntax of C (like me) and who prefer the syntax
                  of basic. I am a longtime Basic programmer, so for me to learn C
                  today would be a waste of time.

                  You can't write code quickly (and have the quality) if you must
                  struggle with the syntax. Now, if basic comes more natural than
                  C, for a programmer, then it makes sense they use Basic. If C
                  comes more natural then of course use that.

                  The next concern is whether the particular compiler one uses, has
                  all the features one needs in the chosen language. PowerBasic has
                  so many features, that it offers basic programmers the power
                  they need to develop complex applications.

                  Personally, I am concerned with the extensive command set, the
                  speed of executable and also the size of executables. PowerBasic
                  fills these needs.

                  Lastly, if a programmer feels the needs to be proficient in more
                  than one language, personally I feel they still should only use one
                  primary programming language, but they should learn Assembler as
                  the secondary language. The ability to use inline assembler with
                  PowerBasic is great, since if you can't do it in basic then do it
                  in assembler.

                  Now as far as comparing PowerBasic to other Basic compilers, PB
                  tends to stick to the older standards of the Basic language syntax
                  for commands that have existed since the days of DOS basics. This
                  produces consistancy for long time Basic programmers. I have
                  experimented with a number of Basic programming languages found on
                  the web (ie. RapidQ, Libery Basic, etc.) and they don't stick with
                  the long time Basic syntax.

                  To compare PowerBasic to a C compiler isn't fair, since programmers
                  used to C, prefer C, but programmers used to Basic prefer basic.

                  I doubt you will find many long time Basic programmers, willingly
                  switching to C. Interestingly though a good number of C programmers
                  are likely familiar enough with Basic to be able to successfully
                  switch (everybody likely learned Basic at one time in their training).
                  Now if a C programmer is deeply ingrained in using the C syntax,
                  they may not feel they would be as productive using Basic and that
                  is very understandable. I know I would find it difficult to switch
                  to C (I think in Basic).

                  Chris Boss
                  Computer Workshop
                  Developer of "EZGUI"


                  • #10

                    Here are a few of my favorite features:

                    - ARRAY SORT, ARRAY SCAN, ARRAY INSERT, ARRAY DELETE commands (ARRAY SORT is faster than QuickSort)
                    - TCP Commands (was able to write a complete basic email client)
                    - (D)ynamic (D)ialog (T)ools Commands, which make GUI programming SO wonderful
                    - Horsepower of file handling (I wrote an XOR encryption program that will read, encrypt, and write back out a 4 MB file in 2 seconds (500 Mhz P3, 128MB RAM)) (I also wrote a Binary Edit utility that will read in a 29MB file into memory, view it, save it, etc. with ease)
                    - PARSE, PARSE$, PARSECOUNT commands (I can read an entire text file in one line of code and have it parsed into an array in 2 more)
                    - Compiled code is extremely small (I'm taking a C++ programming course this semester, and just for fun, I've compiled a few small things in both, and for example, simply trapping keystrokes and outputting the ASCII value on screen, C++ is about twice the size)
                    - Speed (I was able to re-write an encryption algorithm for the company I work with in PB (was in QuickBasic) and using PB features (ie: pointers, etc), it is 27 1/2 times faster)
                    - No runtime libraries
                    - No issues updating DLLs, no need for "binary compatibility" as in VB, etc.
                    - This Support Forum (has helped me and others so very much so many times)

                    I can keep going, but as you can see, PB has some cool features.


                    [This message has been edited by Adam J. Drake (edited December 17, 2002).]
                    Adam Drake
                    Drake Software


                    • #11
                      Hi Gadd,

                      A number of people insist that PowerBasic is far and beyond better
                      than C++ or C, but I don't understand why...
                      I use all 3 flavors! Is one better than the other? Depends on who
                      you ask. And although I do agree with many of the answers that have
                      been posted, however, the real answers can't be answered, until you
                      have used the Power within PowerBasic!

                      There are many reasons for using PowerBasic! I have created many C++
                      dll's (you can search the 3rd party area) - and use them with PowerBasic.
                      I also use dll's created by PowerBasic! It all depends on what I know
                      best and am comfortable with! So, I use the best of both worlds!

                      Programmers are not robots. We all tend to choose our own Methodology!
                      Some may take a scenic route, some the high-road, others a short-cut!

                      However, I'm willing to bet, the full price-tag, that someone (like yourself),
                      that knows a little C++/C, will find PowerBasic pretty amazing! Sure,
                      getting to a level where you can compare, convert old-source-code to PB,
                      and find your way around - may appear to be a daunting task! But don't be
                      afraid! Because - this forum is one of the best in the world! Programmers
                      around the world, willing to help each other - with a common task - Programming
                      in PowerBasic!



                      • #12
                        Well, from a little different perspective...

                        PowerBASIC and C, are both very simalar low-level languages (providing almost
                        total control)... differing mostly only in syntax... C++ is high-level, encapsulating
                        data, so the user only has to call on pre-built functions and structures...yet, this
                        limits the users control...(IMO, C++ is closer to an Application than a programming language)

                        But, mostly Bob and crew, have taken BASIC and matured it to very modern and powerful
                        language... if they were to do the same to C, ie. "PowerC", we may see another language that
                        might be able to compete with PB.


                        Wash DC Area
                        mailto:[email protected][email protected]</A>


                        • #13
                          PowerBASIC and C, are both very simalar low-level languages (providing almost
                          total control)... differing mostly only in syntax...
                          Similar, differing only in syntax?

                          Call me obtuse, but by that standard one might say apples and penguins are similar, differing only in species.


                          Michael Mattias
                          Tal Systems (retired)
                          Port Washington WI USA
                          [email protected]


                          • #14
                            Ok, and maybe a few other things
                            ... but, really not that much (nothing that a PBMacro can't implement)


                            Wash DC Area
                            mailto:[email protected][email protected]</A>


                            • #15
                              The proof is in the pudding, as they say. I'm working on a project with two other programmers. They're programming in C++ & I'm using Powerbasic with Ezgui 2.0. The other two guys are very good programmers, but my applications take less time to code and have a lot more visual sizzle. The fun part, is they alternatly ask me if I can do something in PB ("You don't have sturctures do you?" Yes we do!) and ask me how I did something (wow! that looks great, how'd you do that?). The other day I had to show them what data types we have, lo and behold, we have more and they are more versital.

                              Russ Srole

                              "There are two novels that can change a bookish fourteen-year old's life: The Lord of the Rings and Atlas Shrugged. One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world. The other, of course, involves orcs." - John Rogers


                              • #16
                                They are all apples and oranges.

                                I think that our fastest coders (on this forum) could probably crank out
                                a program faster that the fastest C++ coders could (same program).
                                That said, I think a fast VB programmer might beat them both, but you
                                don't get the same results.

                                PowerBasic is much more intuitive than C++ (which is why so many of us
                                have headaches when we cross the threshold to Windows API coding which
                                is not intuitive).

                                PB takes the honors in ease of use and support (this forum), but C++
                                deserves its due too, like portability, and availability of programming

                                I wish PB weren't so Wintel centric, but that is so much at the very
                                core of its existance (and the core of its developers), that I don't
                                expect major changes anytime soon.

                                Report Card:
                                PowerBasic: B+
                                C++ : B (C++ = B)


                                John Kovacich
                                Ivory Tower Software

                                Try MsgBoxPlus for easy MSGBOX's with custom buttons and graphic backgrounds.

                                John Kovacich
                                Ivory Tower Software


                                • #17
                                  I'm have been using PowerBasic for about 4 years, but now i'm moving into C/C++ because of portability. I can get a C/C++ compiler for any platform, but not with PowerBASIC.
                                  I have been using PB as a easy C, because i never use DDT just SDK so the change from PB to C isn't difficult. I have ported some programs from PB to C without any problem, the more difficult convertion are strings.


                                  BTW PB is one of the most powerful languages, you get great speeds, and easy coding.



                                  • #18
                                    These are some pretty good answers, but my main question is how well PB handles code reuse. C++'s OOP and template features have saved me a lot of time already, how does PB compare to those? I already know about the size advantages and that it puts out pretty fast code, and you guys confirmed that. And personally I really don't like the way PB code looks at all, but that doesn't matter to me if it gets the job done. Are there any major commercial apps I might know about that use PB? I haven't seen any.

                                    Also, do you have any academic discounts? $200 is a lot for any sort of compiler (if I remember that's how much PB costs), especially when I can get a C++ compiler for free and get Visual C++ or Visual Basic for $60 at college.

                                    [This message has been edited by K. Gadd (edited December 18, 2002).]


                                    • #19
                                      "....but my main question is how well PB handles code reuse. C++'s OOP
                                      and template features have saved me a lot of time already...."


                                      To be honest, I havn't used C in 10 yrs, and have never used C++...
                                      but, I think the answer, would be in your inventory, if you already
                                      have C++ code, that you understand...then C++ will help you the most
                                      now... how-ever if you are establishing your code library from stratch,
                                      I don't believe that you will find a better resource of existing code
                                      samples, and support than at this forum... and you would definately
                                      learn more about how it all works here...

                                      just my opinion,

                                      Wash DC Area
                                      mailto:[email protected][email protected]</A>


                                      • #20
                                        You have probably seen many, only you don't know, because software developers
                                        seldom reveal programming language. And PB is tricky to spot, because it has
                                        used to be mostly a DLL language, that is, many VB developers have used it to
                                        create speedy DLL's for their slow VB apps. But that is changing fast now and
                                        I believe we will see lots of PB written app's on the market next year. At
                                        least from me, because I have a lot of fun PB stuff in the owen right now..

                                        Templates are easy to do/use in PB. I keep lots of complete dialogs in separate
                                        includes, for example. Whenever I need an About dialog, Find&Replace dialog, a
                                        preview Window or File search, whatever, I just add #INCLUDE "file" and a few
                                        lines of code, and all is done. And all sorts of standard routines in same way.
                                        And custom controls - easy. You can see some samples of this on my PB webpage,
                                        if you like: