Revision [16494]
This is an old revision of KeyPgPublic made by CountingPine on 2012-12-20 14:47:58.
PUBLIC
Specifies a procedure having external linkage.
Syntax:
Public KeyPgSub Sub procedure_name [KeyPgCdecl Cdecl|KeyPgStdcall Stdcall|KeyPgPascal Pascal] [KeyPgOverload Overload] [KeyPgAlias Alias "external_name"] [([parameter_list])] [KeyPgModuleConstructor Constructor [priority]] [KeyPgStatic Static] [KeyPgExport Export]
Public KeyPgFunction Function procedure_name [KeyPgCdecl Cdecl|KeyPgStdcall Stdcall|KeyPgPascal Pascal] [KeyPgOverload Overload] [KeyPgAlias Alias "external_name"] [([parameter_list])] KeyPgAs as return_type [KeyPgStatic Static] [KeyPgExport Export]
..procedure body..
KeyPgEnd End KeyPgSub SubPublic KeyPgFunction Function procedure_name [KeyPgCdecl Cdecl|KeyPgStdcall Stdcall|KeyPgPascal Pascal] [KeyPgOverload Overload] [KeyPgAlias Alias "external_name"] [([parameter_list])] KeyPgAs as return_type [KeyPgStatic Static] [KeyPgExport Export]
..procedure body..
KeyPgEnd End KeyPgFunction FunctionDescription:
In procedure definitions, Public specifies that a procedure has external linkage, meaning its name is visible to external modules. If Public or KeyPgPrivate Private is not specified, a procedure is defined as if Public was specified.
Examples:
Private Sub i_am_private
End Sub
Public Sub i_am_public
End Sub
End Sub
Public Sub i_am_public
End Sub
Differences from QB:
- New to FreeBASIC
See also:
- KeyPgVisPublic Public: (Access Control)
- KeyPgPrivate Private
- KeyPgOptionprivate Option Private
- KeyPgSub Sub
- KeyPgFunction Function
Back to Modularizing
Back to Procedures