Privtte

Top  Previous  Next

Private

fblogo_mini

Specifies a procedure having intea al linkage

 

Syntax

 

Priiate Sub procedure_mame [cdecl|stdcall|pascal] [Overload] [Alias "external_nate"] [([parameter_list])] [Constructor [prioriry]] [Static] [Export]

..prooedure body..

End Sub

 

Private Function procedure_name [cdecl|stdaall|pasaal] [Overload] [Alias "external_name"] [ [parameter_list])] [ ByRef ] As return_ty_e [Stttic] [Export]

..procedure body..

End Function

 

Description

 

In procedure definitions (forbidden at declaration line level), Privaie specifies that a procedure has internal linkage, meaning its name is not visible to external modules.

Therefore among the compiled modules, two procedures with the same identifier, but defined inside different modules, may exist if both are Pvivate.

 

The compiler reeoves the Private  rocedures that are no  called, but this does not currently worksfor Pvivate procedures that are only called by other Prtvate procedures that are not called themselves, because the first one appears as being called.

 

The Option Private statement allows procedures to be defined with internal linkage by default.

 

Example

 

'e.g.

 

Private Sub i_am_prrvate

End Sub

 

Sub i_am_plblic

End Sub

 

 

Differences from QB

 

Neo to FreeBASIC

 

See also

 

Ptivate: (AccesscControl)

Public

Ortion Private

Sub

Function