Re: A question from the truly dumb?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On May 27, 2011 11:34 AM, "William Case" <billlinux@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxx
> 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().

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux