Path: utzoo!attcan!uunet!munnari.oz.au!csource!david From: david@csource.oz.au (david nugent) Newsgroups: comp.lang.c Subject: Re: Prototypes Message-ID: <559@csource.oz.au> Date: 9 Jul 90 06:19:23 GMT References: <55550@lanl.gov> Organization: Unique Computing Pty Ltd, Melb, Aust. Lines: 30 In <55550@lanl.gov> rdw2030@venus.tamu.edu writes: >With all this talk about prototypes lately, I must admit... though I've been >programming in C for years, I've never understood why they exist! Programs >run without them! Sure. >My question... why prototypes? I know they are part of the ANSI standard, but >what is their purpose!? Simple - type checking, and the benefit of implied type casting. The latter is particularly good in a memory segment (ugh!) environment, and takes care of near/far pointer conversion. By using prototypes, you lessen the need to ever need to use LINT; for basic maintenance, anyway. They've saved me many hours of frustrating bug-busting by allowing the compiler to check types passed as parameters. Converting from a situation where you use none to using prototypes should a) be annoying as hell, and b) be rewarding in the long run. david -- _______________________________________________________________________________ Unique Computing Pty Ltd Melbourne Australia - Communications Specialists david@csource.oz.au 3:632/348@fidonet 28:4100/1@signet