From: "Mark Clements" Newsgroups: alt.msdos,alt.msdos.programmer,comp.os.msdos.4dos,comp.os.msdos.djgpp,comp.os.msdos.programmer References: <3e3129de_2 AT news DOT iglou DOT com> <3E31795C DOT 3010108 AT BellAtlantic DOT net> <3e321bf5_3 AT news DOT iglou DOT com> <9307085f DOT 0301250744 DOT 77f0c663 AT posting DOT google DOT com> Subject: Re: can IBM DOS Version 5.00 be taught to read obj files? Date: Sun, 26 Jan 2003 14:35:46 -0000 Organization: HappyDog Enterprises X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 Lines: 30 Message-ID: <3e33f24e$0$223$cc9e4d1f@news.dial.pipex.com> NNTP-Posting-Host: usercc172.dsl.pipex.com X-Trace: 1043591758 news.dial.pipex.com 223 62.190.234.172 X-Complaints-To: abuse AT uk DOT uu DOT net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Joe Fischer wrote in message news:<3e321bf5_3 AT news DOT iglou DOT com>... > > In alt.msdos > > > > I don't write the same routines a second time, > > let alone over and over. > > With the exception of part of the routine to > > assign a filename and file variable and check the > > existence of the file, I can't think of any routine > > that I would use twice. > As just one of many examples of functions I've written that get used over and over again, my CheckInputFile() function is used in pretty much any program that requires filenames to be passed at the command line. You pass the value of the argument variable where the file is located (or empty string if none) and a default extension (if applicable) and it will expand the filename and path, checking they exist, and prompt the user if there are any problems. The trick to making modular programming useful is to make your functions generic. -- Mark Clements (To reply, remove NOSPAM)