[fpc-pascal]Problems with newer snapshots
Jonas Maebe
jonas at zeus.rug.ac.be
Fri Jun 29 11:37:57 CEST 2001
On vrijdag, juni 29, 2001, at 12:11 , dirk at verwiebe.de wrote:
> I got error messages like that:
> Error: Incompatible types: got "VOID" expected "<procedure variable
> type of
> procedure();>"
>
> The variables are function pointer to assembler functions.
>
> How can i make it work again ???
Add an "@" before the procedure. This was changed recently to make the
compiler consistent with both itself and the documentation.
In TP you have:
procvar(para1,para2,...) = call procedure (or just "procvar" if it has
no parameters)
@procvar = contents of procvar
@@procvar = address of procvar
procvar := procedure/function = assign address of procedure/function to
procvar
In FPC you have:
procvar(para1,para2,...) = call procedure (or just "procvar()" if it has
no parameters)
procvar = contents of procvar
@procvar = address of procvar
procvar := @procedure/@function assign address of procedure/function to
procvar
I think the FPC syntax is more logical.
Jonas
More information about the fpc-pascal
mailing list