A long time ago I had some listing I made that when compiled would not run correctly, but in the editor it was fine. Removing a DEFFN solved it at the time, but I lost the listing and thus my test case and never figured out exactly why it failed. I have just now accidentally rediscovered the problem. If you place DEFFN directly after a PROCEDURE or FUNCTION definition then it fails compiled.
Furthermore this bug only occurs if the PROCEDURE or FUNCTION definition has no parameters.
Example:
- Code: Tout sélectionner
' works in the editor, but not compiled
' insert one line of code above the DEFFN, then it works compiled
@test
EDIT
PROCEDURE test
DEFFN dummy=0
PRINT "test"
RETURN
If you are using DEFFN, be very careful where you place them.