From: john durnall Newsgroups: comp.os.msdos.djgpp Subject: Re: question Date: Sun, 10 Jan 1999 16:38:32 +0000 Organization: Cable Internet (post doesn't reflect views of Cable Internet) Lines: 22 Message-ID: <3698D788.FAEA17BE@freenet.co.uk> References: NNTP-Posting-Host: ppp-1053.telinco.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news1.cableinet.co.uk 915986653 14074 195.188.55.7 (10 Jan 1999 16:44:13 GMT) X-Complaints-To: abuse AT cableinet DOT net NNTP-Posting-Date: 10 Jan 1999 16:44:13 GMT X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com be careful though, if a function is too small, then it will take longer to call the function than to process it :-) Eli Zaretskii wrote: > On Sun, 10 Jan 1999, pjotr wrote: > > > When writing code, is there like a maximum size of lines per function > > you should take into account? I just wrote a 200+ lines function and I > > was just wondering if maybe it's too large for just one function. > > If the function has a single well-defined purpose, then IMHO it's okay to > go beyond 200 lines, even if comments are not counted. Usually, though, > only highly complicated problems require such long functions. In most > cases, you should be able to solve any single problem in less than that, > and if not, to break the problem into several smaller sub-problems. > > DJGPP makes it difficult to debug a function if it has more than 64K > lines. Anything less than that should work. It is up to you to decide > where do you draw the line.