COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Property procedures are ____ by default
A
Local
B
Module-Level
C
Private
D
Public
Explanation: 

Detailed explanation-1: -You can define a Function procedure in a module, class, or structure. It is Public by default, which means you can call it from anywhere in your application that has access to the module, class, or structure in which you defined it.

Detailed explanation-2: -A property procedure is a series of Visual Basic statements that allow a programmer to create and manipulate custom properties. Property procedures can be used to create read-only properties for forms, standard modules, and class modules.

Detailed explanation-3: -A default property is a class or structure property that your code can access without specifying it. When calling code names a class or structure but not a property, and the context allows access to a property, Visual Basic resolves the access to that class or structure’s default property if one exists.

Detailed explanation-4: -A property is a value or characteristic held by a Visual Basic object, such as Caption or Fore Color. Properties can be set at design time by using the Properties window or at run time by using statements in the program code. Object. Property = Value.

There is 1 question to complete.