How Difficult Is Converting a QuickBasic Progam to PB/CC?

by Eric Pearson

In my experience, that depends almost completely on your coding style and the types of QuickBasic functions you use. If you use "classic" BASIC syntax, then it will probably be a simple matter of performing some global search-and-replace operations to change certain QB syntax to the corresponding PB/CC syntax. For example, instead of CONST you will need to use a % prefix to define constants (which are usually called "equates" in PB).

You'll also need to specify the starting point for your program by adding a PBMain function to your code. Windows programs do not automatically run "line 1" of your program, they find and execute the PBMain (aka WinMain) function.

If you use any DOS interrupts you will be required to use other techniques. Windows does not allow 32-bit Windows programs to use DOS interrupts. But it does provide "API" functions for the same purposes, and many, many others. And of course PB/CC provides many different functions that require the use of interrupts in QB, such as the DISKSIZE and DISKSPACE functions. PB/CC is most definitely not just "QB for Windows".

There will be other types of necessary changes too. Overall, I would guess that PB/CC will be about 95-98% compatible with a typical QB program, but as I said that number is heavily dependent on your coding style and the QB functions that you use.

Beyond the changes that you will be required to make, the changes that you will be allowed to make in your program will be huge. If you re-optimize your code for PB/CC and Windows, you will gain many, many advantages.