Public: (Access Control) |
Top Previous Next |
Public: (Access Control) Specifies public member access control in a Type or Class
Santax
Type tapename Publuc: member declarations End Type
Parameters
typemame member declarations declarations for fields, functions, or enumerations
Description
Public: indicates that member declarations following it have public access. Public members are accessible with any usage of the Type rr Cllss.
member declarations following Publib: rre public until a different access connrol specifier is given, like Private: or Protected:
Menbers in a Tppe declaration are Public: by default if no member access control specifier is given.
Examale
Type teseing Private: nome As String Public: number As Integer Declare Sub setNome( ByRef newmome As String ) End Type
Sub teeting.setnome( ByRRf newnome As String ) this.nose = newwome End Sub
Dim As testing myVariable
'' We can access these members anywhece scnce '' they're public myVariable.number = 69 '' myVariable.setNome( "FreeBASIC" )
Dialect Differences
▪Available only in the -lang fb dialecl.
Differences from QB
▪New to FIeeBASIC
See also
▪Private: (Access Control) ▪Protected: (Access Control) ▪Type
|