home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!rutgers!news.columbia.edu!cunixb.cc.columbia.edu!stone
- From: stone@cunixb.cc.columbia.edu (Glenn Stone)
- Newsgroups: comp.lang.pascal
- Subject: procedural types -- a bug in TP?
- Message-ID: <1992Aug28.154106.15275@news.columbia.edu>
- Date: 28 Aug 92 15:41:06 GMT
- Sender: usenet@news.columbia.edu (The Network News)
- Reply-To: stone@cunixb.cc.columbia.edu (Glenn Stone)
- Organization: Columbia University
- Lines: 42
- Nntp-Posting-Host: cunixb.cc.columbia.edu
-
- 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
- I copied the example right out of the manual (Ref Guide 5.0, p. 85 --
- I've paraphrased it a bit):
- ------------------------------------------------
- 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
-
- Is this a bug, am I making some colossally stupid mistake, or am I in
- the Twilight Zone?
-
- Thanks,
-
-
-
-
-
-
- -------------------------------------------------------------------------
- Glenn Davis Stone BITNET: stone@cunixf
- Columbia University INTERNET: stone@cunixb.cc.columbia.edu
- -------------------------------------------------------------------------
-