Subscribe:

Ads 468x60px

Showing posts with label single line. Show all posts
Showing posts with label single line. Show all posts

Wednesday, August 8, 2012

List of Comments in all Programming/Scripting language

I always find it difficult to remember the syntax of different programming/scripting languages I learnt/know. And most common syntax is Comments in various programming/scripting language. So, here I am documenting them all.
Comments are used to embed/put programmer/human-readable comments/tips/suggestion/annotations in the source code of a computer program. Those comments are generally significant to programmers but typically ignorable to compilers and interpreters.

  1. Java
    1. One liner:  // comments
    2. Multi liner: /*  first line
                           second line
                           third line
                      */

  2. Ada
    1. One liner:  -- comments
    2. Multi liner: -- first line
                       -- second line

  3. C#
    1. One liner:  // comments
    2. Multi liner: /*  first line
                           second line
                           third line
                      */

  4. C++
    1. One liner: // comments
    2. Multi liner: /* first line
                           second line
                           third line
                       */