TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Darin Mcbride
from: Robin Sheppard
date: 1998-08-03 16:42:18
subject: comments/prototyping

DM> I don't give any misleading clues.  :-)  I find that 
 DM> massively prototyping at the top is as bad as kitchen-sink 
 DM> comments.  The code gets updated... the comments (prototypes) don't.

   I'm only so-so with my commenting.  Usually it's pretty terse; I 
   innclude just enough to 'jog my memory' if I look at my code later.  As 
   long as I can remember what a chunk of code does, it saves me from 
   having to re-read the source, and 'learn' it again.  Thus, I usually 
   don't have to change much in the way of comments.
   
   As for changing prototypes, if anything relevant changes, any decent 
   compiler will catch that, and at least flag a warning.  Hell, even some 
   poor compilers will; I know mine does.  :)  It's only when the 
   prototypes are 'buried' somewhere (header file, another source module, 
   etc) that updating them becomes a pain in the ass.  This is easily 
   avoided by keeping them in their source module until you're more or less 
   satisfied with the function, and changing it isn't likely, at which 
   point you may stick it in a header file.

 DM> No - I don't put EXTERNAL prototypes in the source module - 
 DM> only prototypes of functions IN that module!

   Ditto that.  For easy modification of prototypes, they should either a) 
   be prototyped at the beginning of the module in which they appear, or b) 
   be placed in a separate header file.
   
... Help!  My name is DOS and I'm trapped inside Windows 95!
___ Blue Wave/DOS v2.30 [NR]

--- Maximus 2.01wb
* Origin: Basic'ly Computers: Mooo-ing Right Along. (1:153/9)
SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728
SEEN-BY: 639/252 670/213 218
@PATH: 153/104 2 716 7715 140/1 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.