Continued from the previous message...
wrapper routine, as in:
MyPut 10, 10, Bitmaps(1)
SUB MyPut (X, Y, BitMap)
PUT (X, Y), BitMap
END SUB
SADD--
QB's SADD is the same as PB's STRPTR, except that QB stores strings
in the DGROUP segment. In PB you can't assume that. So for
instance if you wanted to POKE a value into a string, you would have
to DEF SEG to the right segment, as in:
DEF SEG strseg(a$)
POKE strptr(a$), 32
Dave Navarro's SADD function for PB, which returns a 32-bit pointer
as opposed to QB's 16-bit pointer:
FUNCTION SADD???(Temp$) PUBLIC
Segm = VARSEG(Temp$)
Offs = VARPTR(Temp$)
SADD??? = Segm * 65536 + Offs
END FUNCTION
SCREEN (statement)
QB supports Screen modes 0, 1, 2, 7, 8, 9, 10, 11, 12, 13
PB supports Screen modes 0, 1, 2, 3, 7, 8, 9, 10, 11, 12
SELECT CASE--
The QB IDE syntax checker will turn "CASE = a" into "CASE IS = a".
When converting to PB, the "IS" needs to be removed. PowerBasic
doesn't give an error message when compiling a "CASE IS =", because
it interprets the "IS" as a variable. That can make for errors that
are very hard to track down.
This is changed in PB 3.2. It looks like it treats "CASE IS" as a
synonym for "CASE".
VIEW PRINT--
needs to be converted to a VIEW TEXT statement. QB requires the
VIEW area to be the full width of the screen. All you can specify
is the top and bottom row.
"VIEW PRINT 1 TO 10"
can be duplicated in PB by:
VIEW TEXT (1,1)-(pbvScrnCols,10)
Reading the two manuals side by side indicates some differences in the
meaning or use of the following keywords, but since I don't use these
commands much, I can't comment on them:
COMMON
DRAW-- "V" not allowed in PB
FRE-- not all integers allowed in PB.
GET(graphics)-- STEP not allowed in PB.
OPEN COMn-- FOR not allowed in PB
PAINT-- STEP not allowed in PB
RUN-- line numbers not allowed in PB
STRIG-- STOP not allowed in PB
* RM 1.31 1209 * Anton Monroe 70304.3663@compuserve.com
--- FidoPCB v1.4 [ff013/c]
---------------
* Origin: Sound Advice - 24 Nodes (816)436-4516 (1:280/333)
|