Symptom

Migrating an application, which declares an external xor function, in this instance the Funcky32.dll library, from PowerBuilder version 9 to 2017 will produce syntax errors.

Environment

OS: Windows (any supported version)
3rd party: Funcky Library
PowewrBuilder
Reproducing the Issue

The error can be reproduced using the following steps:

  1. Unzip attached PB9_funcky_xor.zip file into a local directory.
  2. Open pb9_funcky_xor.pbw workspace in PowerBuilder 9.
  3. Run application and a MessageBox will display
  4. Open the same application in PowerBuilder 2017.
  5. You will be prompted to migrate. Click OK.
  6. Click OK again to initiate migration.
  7. The build will fail with an error.
  8. The Errors tab of the Output window will display the following error:

 ---------- Compiler: Errors   (10:42:57 AM)
funcky_xor.pbl(funcky_xor).2: Error       C0031: Syntax error
 ---------- Finished Errors   (10:42:57 AM)

Cause

The migration error is due to 'xor' being added as a reserved word in PowerBuilder.

Resolution

If you remove or rename all external function declarations to xor:
FUNCTION int xor(int n,int v) LIBRARY "FUNCky32.DLL"
the application will migrate and compile properly.

Attachment
0
0