FunctionPointer

The FunctionPointer aspect can be attached to a C#, Swift or Java delegate type declaration in order to indicate that the type represents a C function pointer, not a block.

In Oxygene, this distinction is made based on the keyword used to declare the type – the block and (deprecated) delegate keywords declare a block, while the method and (also deprecated) function and procedure keywords declare a function pointer

type
  SomeFunction = public method(aString: String): Integer;
[FunctionPointer]
public delegate int SomeFunction(string aString);
@FunctionPointer public typealias SomeFunction = (String) -> (Int);
// delegates are not supported in Java (yet)
<FunctionPointer> Public Delegate Function SomeFunction(Parameter As String) As Int

Cocoa and Island Only

The FunctionPointer aspect is available on the Cocoa and Island platforms only.

Defined by the core compiler

See Also