1.

What Is "scope Resolution Operator"?

Answer»

extern keyword ALLOWS out-of-body method declaration in CLASSES. Scope RESOLUTION operator ( :: ) links method declaration to class declaration.

class XYZ;
// SayHello() will be declared outside the body 
// of the class
extern void task SayHello();
endclass : XYZ
void task XYZ :: SayHello();
$MESSAGE("Hello !!!n");
endtask : SayHello

extern keyword allows out-of-body method declaration in classes. Scope resolution operator ( :: ) links method declaration to class declaration.

class XYZ;
// SayHello() will be declared outside the body 
// of the class
extern void task SayHello();
endclass : XYZ
void task XYZ :: SayHello();
$Message("Hello !!!n");
endtask : SayHello



Discussion

No Comment Found