Can someone explain this?
> program WhatsGoingOnHere ; > > type > > FunctionType = function : INTEGER ; > > function NamedFunction : INTEGER ; > begin > NamedFunction := 12345 ; > end ; > > function TestFunction ( ActualParameter : FunctionType ) : INTEGER ; > begin > TestFunction := ActualParameter ( ) ; { compiles and runs o.k. } > TestFunction := ActualParameter ; { gives "incompatible type" error, > but ... } > TestFunction := NamedFunction ; { ... compiles and runs o.k. } > end ; > > begin > WRITELN ( TestFunction ( NamedFunction ) ) ; > end . _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal