Set: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 26: | Line 26: | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Variable Handling]] |
Revision as of 19:54, 14 September 2012
Set objectvariable = {objectexpression | Nothing}
Description
Set is used to assign an object reference to a variable. The required component, objectvariable, is a variable that follows standard variable naming conventions. The required component, objectexpression, is the name of an object, a variable containing an object reference, or Function call that returns an object. The optional keyword, Nothing, removes the association between objectvariable and any given object. When an object has no variables which reference it, the system and memory resources allocated to it are released. Set is equivalent to a normal assignment statement.
Example
Rem Set Example 'Set assigns objects to variables Dim ButtonRef Set ButtonRef=Button1 Print ButtonRef.id
Output
Button1