home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!demos!news-server
- From: Boris Tyshkiewitch <btysh@aha.msk.su>
- Subject: procedural types -- a bug in TP?
- References: <22.23.7.0.2AA6F946@aha.msk.su>
- Date: Fri, 4 Sep 1992 21:32:45 GMT
- Reply-To: btysh@aha.msk.su
- Organization: <*AsA Trading Company*> (Echo2News)
- Sender: news-server@kremvax.hq.demos.su
- Message-ID: <2.5020.52.2aa77e9d@aha.msk.su>
- Lines: 49
-
- Hello mwodrich@cs1.uct.ac.za!
-
- Wednesday September 02 1992, mwodrich@cs1.uct.ac.za writes to All:
-
-
- muaz> In article <1992Aug28.154106.15275@news.columbia.edu>
- muaz> stone@cunixb.cc.columbia.edu (Glenn Stone) writes:
-
- >> From: stone@cunixb.cc.columbia.edu (Glenn Stone)
- >> Subject: procedural types -- a bug in TP?
- >> Date: 28 Aug 92 15:41:06 GMT
- >> This seems to dumb, I'm sure I'm missing something right under my nose.
- >> But anyway:
- >>
- >> I want to use a procedural type but my compiler (TP 5.5) objects. So
-
- >> type
- >> proc = procedure (var x,y : integer);
-
- ^^^^
-
- >> var p : proc;
- >>
- >> {F+}
- >> procedure swap (a,b : integer);
-
- ^^^^
-
- >> begin
- >> end;
- >> {F-}
- >>
- >> begin
- >> p := swap;
- >> end.
- >> -+--+--+--+--+--+--+--+--+--+--+--+--+--+-
- >>
- >> The compiler stops on the "p := swap" line and says
- >> Error 143: Invalid procedure or function reference
-
- Its true, use "var" in both cases.
-
- Boris.
-
- --- GoldED 2.40+
- * Origin: Boris Tyshkiewitch, btysh@aha.msk.su, 2:5020/52@fidonet. (2:5020/52)
-
-
-
-