Comments

Gamma: Version 4.0
Prev | Chapter 3. Basic Data Types and Mechanisms | Next

# 3.7. Comments

There are two ways insert comments into Gamma code. To comment out a line, you can use a double slash ( `//` ) like this:

        a = 5;
        b = 7;

        // This assigns the value of c.

        c = a + b;

To comment out a block of text, you can put the symbol `/*` at the beginning, and `*/ at the end, like this:`

        a = 5;
        b = 7;

        /* This assigns the value of c,
           which is very important to the
           future of our project.*/

        c = a + b;

| It is not permitted to put an unmatched double quote mark ( `"` ) into the second type of comment. This is a feature that allows you to comment out a string, to include a comment mark in a string, and even to comment out a string that includes comment characters, like this:
        /*
        princ ("/* this is what a comment looks like\n");
        princ ("   when extended to multiple lines\n");
        princ ("*/\n");
        */

Prev | Home | Next
Operators and Expressions | Up | Reserved Words

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.