Public
Specifies a procedure having external linkage.
Syntax
`
Public Sub procedure_name [Overload] [cdecl|stdcall|pascal] [Alias "external_name"] [([parameter_list])] [Constructor [priority]] [Static] [Export]
..procedure body..
End Sub
Public Function procedure_name [Overload] [cdecl|stdcall|pascal] [Alias "external_name"] [([parameter_list])] As return_type [Static] [Export]
..procedure body..
End Function
`
Description
In procedure definitions, `Public` specifies that a procedure has external linkage, meaning it's 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
`
Differences from QB

- New to FreeBASIC

See also

- `Private`
- `Option Private`
- `Sub`
- `Function`