Skip to content

PUBLIC


Specifies a procedure having external linkage.

Syntax

vb
Public Sub procedure_name [Cdecl|Stdcall|Pascal] [Overload] [Alias "external_name"] [([parameter_list])] [Constructor [priority]] [Static] [Export]

..procedure body..

End Sub

Public Function procedure_name [Cdecl|Stdcall|Pascal] [Overload] [Alias "external_name"] [([parameter_list])] [ byref ] as return_type  [Static] [Export]

..procedure body..

End Function

Description

In procedure definitions (forbidden at declaration line level), 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.

Examples

start GeSHi

vb
Private Sub i_am_private
End Sub

Public Sub i_am_public
End Sub

end GeSHi

Differences from QB

  • New to FreeBASIC

See also

  • Public: (Access Control)
  • Private
  • Option Private
  • Sub
  • Function

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft