A question from the truly dumb?
nathan forbes
me.lists at nathanforbes.com
Fri May 27 15:44:57 UTC 2011
On May 27, 2011 11:34 AM, "William Case" <billlinux at rogers.com> wrote:
>
> Hi,
>
> More and more I have noticed the use of a double colon [::]in coding
> explanations but have not noticed it actually used anywhere. Does it
> mean anything other than being used as a format.
>
> For example, in a recent repo description:
>
> perl-DateTime-Format-Natural
> Description :
> DateTime::Format::Natural takes a string with a human readable
> date/time and creates a machine readable one by applying natural
> parsing logic.
>
> rsync uses the :: in its a man pages. There it seems to indicate a
> remote machine, but doesn't seem to be required.
>
> Just something I have been meaning to ask for a long time.
>
> --
> Regards Bill
> Fedora 14, Gnome 2.32
> Evo.2.32, Emacs 23.2.1
>
> --
> users mailing list
> users at lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Well Perl and C++ use it as part of their syntax. In your example, the
module DateTime contains Format which contains Natural. So the full name of
Natural would be DateTime::Format::Natural.
And in C++ it's used to display the scope of namespaces and classes, and so
on. For example if you had something like:
namespace example {
class Hello {
static int myMethod();
}
}
In order to call myMethod() you would do example::Hello::myMethod().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20110527/c5c1bc1a/attachment.html
More information about the users
mailing list