Public
Specifies a procedure having external linkage.
Public Sub procedure_name [cdecl|stdcall|pascal] [Overload] [Alias "external_name"] [([parameter_list])] [Constructor [priority]] [Static] [Export]
Public Function procedure_name [cdecl|stdcall|pascal] [Overload] [Alias "external_name"] [([parameter_list])] As return_type [Static] [Export]
In procedure definitions, Public specifies that a procedure has external linkage, meaning its name is visible to external modules. If Public or Private is not specified, a procedure is defined as if Public was specified.
Syntax
Public Sub procedure_name [cdecl|stdcall|pascal] [Overload] [Alias "external_name"] [([parameter_list])] [Constructor [priority]] [Static] [Export]
..procedure body..
End SubPublic Function procedure_name [cdecl|stdcall|pascal] [Overload] [Alias "external_name"] [([parameter_list])] As return_type [Static] [Export]
..procedure body..
End FunctionDescription
In procedure definitions, Public specifies that a procedure has external linkage, meaning its name is visible to external modules. If Public or Private is not specified, a procedure is defined as if Public was specified.
Example
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
- Public: (Access Control)
- Private
- Option Private
- Sub
- Function