| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Conventions? C |
Hi Ray On (10 Sep 94) Ray Markham wrote to John Spence... JS> I never see a C programme with an include like #include RM> I have resorted to this a number of times. For example when all the files RM> relate to the same set of data, but are functionally different, i.e. input RM> and output etc. When the files begin to get too large to be comfortably RM> maintained, I will break them down into functionally separate modules and RM> #include "input.c" etc. from one main program file. This gives a place RM> where all the header file #include's can take place as well, thereby RM> keeping all the code manageable. This is especially important in larger RM> projects which can end up being composed of many files. I think I'd find this approach a bit less manageable. If I came back to the project after a break, and wanted to #include another header file in routine X, I'd have to hunt down the "master" file and include it there. If the compiler threw up an Undefined Symbol error, I'd be looking at two files at once to track down the error. I frequently do a fast syntax check on a C file by telling the IDE to compile (not link) the current file only. This wouldn't work if the header file includes were elsewhere. I managed to think these reasons up in a few minutes, and I'm only a dabbler in C. Wonder what the real programmers think... Cheers --- PPoint 1.86* Origin: Silicon Heaven (3:711/934.16) SEEN-BY: 711/809 934 @PATH: 711/934 |
|
| 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™.