Syntax Highlighting - Examples

Examples

Below is a snippet of syntax highlighted C code:

/* Hello World */ #include #include int main { printf("Hello World\n"); return 0; }

Here is the same code non-highlighted:

/* Hello World */ #include #include int main { printf("Hello World\n"); return 0; }


Below is another snippet of syntax highlighted C++ code:

// Create "windowCount" Window objects: int windowCount = 10; Window **windows = new Window *; for (int i = 0; i < windowCount; ++i) { windows = new Window; }

In the C++ example, the editor has recognized the keywords int, new, and for. The comment at the beginning is also highlighted in a specific manner to distinguish it from working code.

Read more about this topic:  Syntax Highlighting

Famous quotes containing the word examples:

    There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring ‘em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.
    Bernard Mandeville (1670–1733)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)