I was wondering if there is any specific methodology of introducing/explaining a file, something like:
;--------------------------------------------------
; $Id: analysis.ncl, v 1.0 2009/09/07 23:05:00 samrat Exp $
;--------------------------------------------------
; File: analysis.ncl
; Author: Samrat Rao
; Indian Institute of Science, Bangalore
; India
; Date: Monday 7th September 2009 23:05:00 I(L)ST
; Description: This is the top-level script for my analysis routines
;--------------------------------------------------
I copied this from a similar file. But i am unable to figure out a fixed pattern to any such introduction, even from source codes.
Commenting at the start of a file varies wildly and I do not believe there
is a convention universally used for all languages, though some
conventions are more common than others. One not-just-commenting
convention may be the “shebang” line at the start of scripts:
<code>
#!/bin/bash
*snip rest of code
</code
The first line of a script has this to tell the environment which
interpreter to use to parse the file (/bin/bash in this case, or
/usr/bin/perl in other cases). This is technically a comment but it’s a
special comment and it must be the very first line of the file.
Otherwise in my files I include a few things… the author’s name (me),
my e-mail address, a version number (typically including a date in an
appropriate format at the end, such as 20090908143400Z), and then a
description of what it is. The use of dashes to create “sections” is, to
me, just fluff and I do not do it but if it floats your boat then go with it.
Good luck.
platinum wrote:
> far as i know you get to decide…
>
> but, be sure and use a line beginning which will mark it as a comment…
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/