An external method declaration introduces a new method whose implementation is provided external to the program. Because an external method declaration provides no actual implementation, it has no method body or End
construct. External methods are implicitly shared and may not handle events or implement interface members. If no return type is specified on a function, it is implicitly Object
. The accessibility domain of the return type and parameters types of an external method must be the same as or a superset of the accessibility domain of the external method itself.
The library clause of an external method declaration specifies the name of the external file that implements the method. The optional alias clause is a string that specifies the ordinal or name of the method in the external file. A single character set modifier may also be specified, which governs the character set used to marshal strings during a call to the external method. Unicode
marshals all strings to Unicode values, Ansi
marshals all strings to ANSI values, Auto
marshals the strings according to the NGWS Runtime rules based on the name of the method (or the alias name, if specified). If no modifier is specified, Auto
is assumed.
Declare
[ CharsetModifier ] Sub
[ Attributes ] Identifier(
[ FormalParameterList ] )
] LineTerminatorDeclare
[ CharsetModifier ] Function
[ Attributes ] Identifier(
[ FormalParameterList ] )
] [ As
TypeName ]Overloads
Ansi
| Unicode
| Auto
Lib
StringLiteralAlias
StringLiteral