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

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!demos!news-server
  3. From:  Boris Tyshkiewitch <btysh@aha.msk.su>
  4. Subject: procedural types -- a bug in TP?
  5. References: <22.23.7.0.2AA6F946@aha.msk.su>
  6. Date: Fri, 4 Sep 1992 21:32:45 GMT
  7. Reply-To: btysh@aha.msk.su
  8. Organization: <*AsA Trading Company*> (Echo2News)
  9. Sender: news-server@kremvax.hq.demos.su
  10. Message-ID: <2.5020.52.2aa77e9d@aha.msk.su>
  11. Lines: 49
  12.  
  13. Hello mwodrich@cs1.uct.ac.za!
  14.  
  15. Wednesday September 02 1992, mwodrich@cs1.uct.ac.za writes to All:
  16.  
  17.  
  18.  muaz> In article <1992Aug28.154106.15275@news.columbia.edu>
  19.  muaz> stone@cunixb.cc.columbia.edu (Glenn Stone) writes:
  20.  
  21.  >> From: stone@cunixb.cc.columbia.edu (Glenn Stone)
  22.  >> Subject: procedural types -- a bug in TP?
  23.  >> Date: 28 Aug 92 15:41:06 GMT
  24.  >> This seems to dumb, I'm sure I'm missing something right under my nose.
  25.  >> But anyway:
  26.  >>
  27.  >> I want to use a procedural type but my compiler (TP 5.5) objects.  So
  28.  
  29.  >> type
  30.  >> proc = procedure (var x,y : integer);
  31.  
  32.                      ^^^^
  33.  
  34.  >> var p : proc;
  35.  >>
  36.  >> {F+}
  37.  >> procedure swap (a,b : integer);
  38.  
  39.                    ^^^^
  40.  
  41.  >> begin
  42.  >> end;
  43.  >> {F-}
  44.  >>
  45.  >> begin
  46.  >> p := swap;
  47.  >> end.
  48.  >> -+--+--+--+--+--+--+--+--+--+--+--+--+--+-
  49.  >>
  50.  >> The compiler stops on the "p := swap" line and says
  51.  >> Error 143: Invalid procedure or function reference
  52.  
  53.  Its true, use "var" in both cases.
  54.  
  55. Boris.
  56.  
  57. --- GoldED 2.40+
  58.  * Origin: Boris Tyshkiewitch, btysh@aha.msk.su, 2:5020/52@fidonet. (2:5020/52)
  59.  
  60.  
  61.  
  62.