User Tools

Site Tools


public_set_variable_public_to_all_class_modules_.htm
Navigation:  Clarion.Net (Clarion#) > Clarion# Language Extensions > Variable and Entity Attributes >====== PUBLIC (set variable public to all CLASS modules) ====== Previous pageReturn to chapter overviewNext page

NewCNet.jpg

PUBLIC

blk2blue.jpg

The PUBLIC attribute specifies that the variable on which it is placed is visible to all PROCEDUREs defined within the source module containing the methods of the CLASS structure (whether members of the CLASS or not). This encapsulates the data from other CLASSes.

PUBLIC is also valid when used with static (threaded or non-threaded) variables outside of a CLASS structure. If a static variable is declared with the PUBLIC attribute, the compiler generates it without a public external name. Hence, it can only be used by procedures defined in the same source module.

Example:

MyNumber     LONG,PUBLIC     !make variable public to all procedures in module

See Also: PRIVATE, PROTECTED , INTERNAL

public_set_variable_public_to_all_class_modules_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1