SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why is that? (comments)

    Hi !

    Does anyone know why exactly there are 2 ways to write a one
    line comment??
    PHP Code:
    // comment
    # comment 
    I'm just interested to know why?
    Danny Grubman @ http://www.our-network.net
    "Intellectuals solve problems; geniuses prevent them."

  2. #2
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Because you can, why does it matter?

    PHP has the two different one-line comment styles so that people used to commenting C/C++ code can comment in their own style, and *nix shell programmers can comment in their own style. It's just to make life easier for people and to remove yet another idiosyncrasy between languages.
    Last edited by DJ P@CkMaN; Sep 7, 2003 at 03:40.

  3. #3
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice to know that, thanks.
    Danny Grubman @ http://www.our-network.net
    "Intellectuals solve problems; geniuses prevent them."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •