Scott S. wrote in post #1169955:
That’s good. To my thinking it’s better that you find out in your own
way rather than having someone just tell you, so I hope I managed to
for your final exam:
What does the “::” syntax with nothing before it do?
Thx, I like it…
The double colon operator is the scope resolution operator. It specifies
in which class or module you reference a constant. Preceding a constant
with :: means that you take it from the outer, or global, scope.
So, in other words, or better said, my own words, if you have a module
‘MyModule’ that contains a class ‘MyClass’, you can refer to it by
writing MyModule::MyClass. As if it were a path to a file in a
If ‘MyClass’ is a class in the outer (global) scope as well, you refer
to it like ::MyClass
This way you can refer to two different classes with the same name, but
each into their own namespace.
Hope I passed…