From: pb@excelsior.xs4all.nl.REMOVE-THIS (Marc van den Dikkenberg)
Subject: Re: Large App in PDS -- Convert to PowerBASIC?
On 19 Apr 1998 12:35:14 GMT, mikeainia@aol.com (MikeAinIA) wrote:
>In article , guymacon@deltanet.com (Guy
>Macon) writes:
>
>>How hard would it be for our friend with the huge program to try a test
>>compile to see how big the resulting program really is? I have been
>>pleasently suprised by how tight PB code is. Don't forget to set the
>>compiler for small, not for fast...
>The translation of 16 M. of Quick to Power Basic would be
>daunting to me. Better invest in a good QB - PB translator.
There is a QB -> PB translator around that will fix the most common
problems: different DIM statements, call interrupt, option base 1/0, etc.
See below for a more elaborate list of its capabilities:
You can download it from my homepage: http://www.xs4all.nl/~excel/pb.html
It has also appeared in one of the past ABC packets, but I don't recall
which one...
------------------------------------------
CASE: used differently
CLEAR: is used by QB to set the stack size. QB2PB inserts a $STACK line.
CLS: QB integers are changed to PB strings. ie, CLS 0 becomes CLS SCREEN
DIM SHARED Var$(10) becomes DIM Var(10) AS SHARED STRING
ELSE: must stand alone in PB. ELSE a = b becomes two lines
OPENing files FOR BINARY: QB numbers the first position as 1, PB defaults
to 0, so OPEN A$ FOR BINARY AS #1 will have OPTION BINARY BASE 1
inserted before it.
VIEW PRINT: QB's VIEW PRINT can only use the full width of the screen.
PB's VIEW TEXT lets you define a width as well as height.
VIEW PRINT 1 TO 10 is replaced by VIEW TEXT (1,1)-(pbvScrnCols,10),
which will do the same thing as the QB statement.
CONSTANTS: QB constants look like variables and need a CONST statement to
define them. They can be any type variable and may sometimes have
only a local scope. PB calls them equates, only allows integers,
and they are always global. Equates are shown by a preceding "%".
QB can define more than one constant per line; PB uses separate
lines. QB2PB changes integer constants thus:
CONST X% = 1, Y% = 2 becomes %X = 1
%Y = 2
If a constant is greater than 32767, it can't be an integer, PB
will tell you about it, and you can decide what to do.
QB2PB makes an attempt to identify string constants and convert
them to global or local string variables as appropriate.
QB2PB will keep track of up to 300 constants and change them
wherever they appear. If you need more than that it's just a
matter of changing one DIM statement. If you use $include files to
declare constants, it will find them. Conversion of constants is
not absolutely perfect. If you are using non-integer or local
constants, you will want to double check the results.
"REGTYPE" variables used by CALL INTERRUPT:
QB and PB are real different here. QB2PB will make the normal
syntax conversions, like:
Regs.ax = a% --> Reg 1, a%
a% = Regs.ax --> a% = Reg(1)
CALL INTERRUPT(&H21, Regs, Regs) --> CALL INTERRUPT &H21
'$INCLUDE: 'FileName' --> $INCLUDE "FileName"
SADD --> STRPTR
CVSMBF --> CVMS
CVDMBF --> CVMD
MKSMBF$ --> MKMS$
MKDMBF$ --> MKMD$
--
Marc van den Dikkenberg
-----------------------
The PowerBasic Archives
http://www.xs4all.nl/~excel/pb.html
*** QwkNews (tm) v2.1
* [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|