Help Search Campus Map Directories Webmail Home Alumnae Academics Admission Athletics Student Life Offices & Services Library & Technology News & Events About the College Navigation Bar
MHC Home Using the Document Interface
TopNext Page

Comments

In order to provide documentation for other people who read your DI code, it is helpful to include comments. This is especially important as the size and complexity of your DI pages increase.

In general, comments begin with the # character. Anything from this point until the next end-of-line character is ignored. Comments are generally most useful when using command continuation.

Here is an example of how you might use comments to make code more readable:

<!--.cgivars;                              # read CGI form variables
ifdef myname;                              # if the variable myname was passed in the form
   echo "Your name is $myname"; 
else;                                      # myname not passed in the form
   echo "You didn't tell me your name";
endif-->

----------------------------------------
Top | Next Page

Home | Directories | Web Email | Calendar | Campus Map | Search | Help

About the College | Admission | Academics | Student Life | Athletics
Offices & Services | Giving | News & Events | Alumnae | Library & Technology

Copyright © 2001 Mount Holyoke College. This page created by the OIS Operations Group and maintained by Webmaster. Last modified on November 2, 2001.