PBXA64 V22 vs PowerBASIC Compatibility

YES = Fully supported PART = Partial NO = Not implemented

Compiler Directives

DirectivePBXA64Notes
#COMPILE EXE/DLLYESDLL/GUI modes rejected with diagnostic (V22)
#DIM ALL / NONEYES#DIM ALL only
#INCLUDE / ONCE / INCLUDELONCEYESRecursive resolution with depth tracking (V22)
#PCODE / #ENDPYESPILOT embedded blocks
#IF / #ELSEIF / #ELSE / #ENDIF / $IFYESConditional compilation (V21)
#DEFINE / #UNDEF / %DEF()YESSymbol definition and detection (V21/V22)
MACRO / MACROFUNCTION / MACROTEMPYESFull macro expansion engine (V22)
#RESOURCENOPE resources
#DEBUG / #TOOLS / #OPTIMIZENO
#REGISTER / #ALIGN / #STACKNO

Declarations & Procedures

FeaturePBXA64Notes
FUNCTION name(...) AS typeYES
SUB name(...)YES
FUNCTION PBMAIN() AS LONGYESEntry point
DECLARE FUNCTION/SUB ... LIB ... ALIAS ...YES
DECLARE ... ALIAS "#ordinal"YESV13+
DECLARE ... VARARGYESV17+
BYVAL / BYREFYES
OPTIONAL / OPTNO
CALLBACK FUNCTIONYESV17+
MACRO / MACROFUNCTIONYESFull expansion engine (V22)
CLASS / INTERFACE / METHOD / PROPERTYNOCOM objects

Variable Declarations

FeaturePBXA64Notes
LOCALYES
DIMYES
STATICYES
GLOBALYESLimited support
THREADEDNO
REGISTERNO

Data Types

TypeSuffixPBXA64Notes
BYTE?YES
WORD?YES
DWORD?YES
INTEGER%YES
LONG&YES
QUAD&&YES
SINGLE!PARTPartial SSE lowering
DOUBLE#PARTPartial SSE lowering
EXT##PARTPartial x87
CURRENCY@YES
STRING$PARTFixed buffers; heap runtime in V19
WSTRING$$PARTScalar only, heap runtime in V19
ASCIIZ / PTRYES
VARIANTNO
OBJECT / GUIDNO

User-Defined Types

FeaturePBXA64Notes
TYPE ... END TYPEPARTNumeric/STRING/nested fields, member access, deep copy (V15)
UNION ... END UNIONNO
ENUM ... END ENUMNO

Control Flow Statements

StatementPBXA64Notes
IF / ELSEIF / ELSE / END IFYES
FOR var = start TO end [STEP n] / NEXTYES
WHILE / WENDYES
DO [WHILE|UNTIL] / LOOP [WHILE|UNTIL]YES
SELECT CASE / CASE / CASE ELSE / END SELECTYES
GOTO labelYES
GOSUB label / RETURNYES
EXIT FOR|WHILE|DO|FUNCTION|SUBYES
ITERATE FOR|WHILE|DOYES
CALL name(args)YES

I/O Statements

StatementPBXA64Notes
PRINT exprYES
INPUT [prompt;] varYESConsole ReadFile
PRINT #n, exprYES
INPUT #n, varYES
LINE INPUT #n, var$YESCR/LF-aware (V13)
LINE INPUT prompt; var$NO
OPEN FOR INPUT|OUTPUT|APPEND|BINARY|RANDOMYESRANDOM/BINARY in V19
OPEN ... ENCODING UTF16LE_BOM|AUTO|UTF8|ANSIYESV17-V19
CLOSE #nYES
GET #n, [pos,] varYES
PUT #n, [pos,] varYES
SEEK #n, posYES
PUT #n UDT with STRING/WSTRINGYESV20: descriptor-safe serialization
WRITE #nNO
LPRINTNO

File Functions

FunctionPBXA64Notes
EOF(#n)YESV12+
LOF(#n)YESV12+
LOC(#n)YESV19+
SEEK(#n)YESV19+
FREEFILENO
FILEATTRNO
DIR$ / FILECOPY / KILL / NAME / MKDIR / CHDIRNO

String Functions

FunctionPBXA64Notes
LEFT$(s$, n)YES
RIGHT$(s$, n)YES
MID$(s$, start [, n])YES
TRIM$ / LTRIM$ / RTRIM$YES
UCASE$ / LCASE$YES
LEN(s$)YES
STRPTR(s$) / VARPTR(v)YES
FORMAT$(n)PARTNumeric only, no mask
SPACE$ / STRING$PARTRuntime exists (V12/V19)
REMOVE$ / EXTRACT$ / PARSE$PARTRuntime exists (V12/V19)
INSTR / TALLY / VERIFYPARTINSTR (V21); TALLY/VERIFY not yet
STR$ / VAL / CHR$ / ASC / HEX$ / BIN$ / OCT$PARTSTR$/VAL/CHR$/ASC/HEX$ (V21); BIN$/OCT$ no
USING$ / REPEAT$ / BUILD$ / WRAP$NO
MKL$ / CVI / MKI$ / CVS / MKD$ / CVD etc.NO

Math Functions

FunctionPBXA64Notes
ABS / SGN / INT / FIX / FRAC / ROUNDPARTABS/SGN/INT (V21); FIX/FRAC/ROUND no
SIN / COS / TAN / ATNPARTSIN/COS (V21); TAN/ATN no
EXP / LOG / SQRPARTSQR (V21); EXP/LOG no
RND / RANDOMIZEYESV21+
MIN / MAX / SWAPPARTSWAP (V21); MIN/MAX no

Arrays

FeaturePBXA64Notes
Fixed arrays: DIM a(upper)YES
Fixed arrays: DIM a(lower TO upper)YES
REDIM a(bounds) AS typeYESStack-backed
REDIM PRESERVEPARTBasic support (V15)
LBOUND / UBOUNDYES
ARRAYATTRNO
ERASENO
ARRAY SCAN / SORT / INSERT / DELETENO

Operators

OperatorPBXA64Notes
+ - * / \ MOD ^YES
= <> < > <= >=YES
AND OR NOTYES
+ (string concat)YES
& (string concat)YESV21+
XOR EQV IMPYESV21+
IS ISFALSE ISTRUENOObject operators

Miscellaneous

FeaturePBXA64
SLEEP / WAITKEY$ / STDOUT / STDINPARTSLEEP (V21); others no
LSET / RSET / LET / SWAP / INCR / DECRYESV21+
WRITE #nYESV21+
POKE / PEEK / POKE$ / PEEK$ / MEMORYNO
DATE$ / TIME$ / NOW / TIMERYESV21+
CODEPTR / FUNCPTRYESV21+
KILL / NAME / MKDIR / CHDIR / DIR$ / FREEFILEYESV21+
SHELLYESV21+
PILOT (T: A: M: Y: N: C: J: U: E: R: S: D: GR: SO:)YES
Standalone .pilot/.pil/.pcode filesYES
#ASM inline assembly blocksNO

Summary

CategoryYESPARTNO
Directives703
Declarations & Procedures903
Variable Declarations402
Data Types842
User-Defined Types012
Control Flow1000
I/O Statements1103
File Functions402
String Functions9610
Math Functions1410
Arrays414
Operators1702
Other22111
TOTAL1061754

106 fully supported, 17 partial, 54 not yet implemented. PBXA64 V22 covers the core PB language plus macros, conditional compilation, string functions, file I/O, math functions, arrays, WinAPI, and PILOT. Missing: COM/objects, full graphics, PE resources, UNION, and advanced string packing.