{{fbdoc item="title" value="PROTECTED: (Access Control)"}}----
Specifies protected member access control in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##

{{fbdoc item="syntax"}}##
	[[KeyPgType Type]] //typename//
		**Protected:**
			//member declarations//
	End Type
##
{{fbdoc item="param"}}
	##//typename//##
		name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##
	##//member declarations//##
		declarations for fields, functions, or enumerations

{{fbdoc item="desc"}}
	##**Protected:**## indicates that ##//member declarations//## following it have protected access.  Protected members are accessible only from inside a member function for the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, and classes which are derived from the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##.
	
	##//member declarations//## following ##**Protected:**## are protected until a different access control specifier is given, like ##[[KeyPgVisPrivate Private:]]## or ##[[KeyPgVisPublic Public:]]##.

	Members in a ##[[KeyPgType Type]]## declaration are ##**Public:**## by default if no member access control specifier is given.

	NOTE: This keyword is useful only since fbc version 0.24 because inheritance is then supported.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/udt/protected.bas"}}%%(freebasic)
  '' Example pending classes feature ...
%%

{{fbdoc item="lang"}}
	- Available only in the //[[CompilerOptlang -lang fb]]// dialect.

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgClass Class]]##
	- ##[[KeyPgVisPrivate Private:]]## (Access Control)
	- ##[[KeyPgVisPublic Public:]]## (Access Control)
	- ##[[KeyPgType Type]]##

{{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}}