[ANSYS, Inc. Logo] return to home search
next up previous contents index

A.2 Commenting Your C Code

It is good programming practice to document your C code with comments that are useful for explaining the purpose of the function. In a single line of code, your comments must begin with the /* identifier, followed by text, and end with the */ identifier as shown by the following:

/* This is how I put a comment in my C program  */

Comments that span multiple lines are bracketed by the same identifiers:

/* This is how I put a comment in my C program 
   that spans more 
   than one line.     */

figure   

Do not include a DEFINE macro name (e.g., DEFINE_PROFILE) within a comment in your source code. This will cause a compilation error.


next up previous contents index Previous: A.1 Introduction
Up: A. C Programming Basics
Next: A.3 C Data Types
Release 12.0 © ANSYS, Inc. 2009-01-14