home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5297 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.7 KB  |  37 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!world!art
  3. From: art@world.std.com (Al Thompson)
  4. Subject: Re: TP units question
  5. In-Reply-To: steveg@iplmail.orl.mmc.com's message of 9 Sep 92 15:24:08 GMT
  6. Message-ID: <ART.92Sep10133100@world.std.com>
  7. Sender: art@world.std.com (Al Thompson)
  8. Organization: The World Public Access UNIX, Brookline, MA
  9. References: <1992Sep4.141203.28370@news.columbia.edu>
  10.     <dmurdoch.123.715622406@mast.queensu.ca>
  11.     <1992Sep9.152408.842@iplmail.orl.mmc.com>
  12. Date: Thu, 10 Sep 1992 18:31:00 GMT
  13. Lines: 22
  14.  
  15.  
  16. In article <1992Sep9.152408.842@iplmail.orl.mmc.com> steveg@iplmail.orl.mmc.com (Steve Gabrilowitz) writes:
  17.  
  18.  
  19.    |> In article <1992Sep4.141203.28370@news.columbia.edu> stone@cunixb.cc.columbia.edu (Glenn Stone) writes:
  20.    |> >If a procedure/function is only used within the implementation section
  21.    |> >of a unit, it doesn't have to be declared in the interface section,
  22.    |> >but is there any disadvantage to doing so?  I'm using TP 5.5.
  23.  
  24.    Another disadvantage of doing this is that if you make any changes to the
  25.    parameter list in the routine, you have to change it in two places (interface and
  26.    implementation) instead of just one.  
  27.  
  28. No you don't.  The only place the parameter list must appear is the
  29. interface section.  The occurence of the parameter list in the
  30. implementation section is optional in TP and not permitted in Extended
  31. Standard Pascal.  I usually include the parameter list inside a comment
  32. in the implementation section.  This serves as a reminder as to what the
  33. parameters are without requiring my going back and forth between the
  34. interface and implementations, a real pain in a large program.These
  35. remarks of course only apply to exported procedures.
  36.  
  37.