home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!stanford.edu!rock!taco!npstewar
- From: npstewar@eos.ncsu.edu (NATHAN PHILLIP STEWART)
- Subject: Pointers to functions w/o Turbo
- Message-ID: <1992Nov20.155606.2611@ncsu.edu>
- Originator: npstewar@c00720-239rd.eos.ncsu.edu
- Lines: 24
- Sender: news@ncsu.edu (USENET News System)
- Reply-To: npstewar@eos.ncsu.edu (NATHAN PHILLIP STEWART)
- Organization: North Carolina State University, Project Eos
- Date: Fri, 20 Nov 1992 15:56:06 GMT
-
-
- I've seen the thread about doing this in turbo, but I couldn't get my problem to
- work even in TP6.0, and I'd like to do this on DEC's pascal. I tried to set up
- a function Simps1_3(a,b:real;functionpoint:sometype):real; to integrate Function
- Bob(a:real):real; and Function Fred(a:real):real; by Simpson's 1/3 rule.
-
- The other thread dealt with this using objects, which aren't supported by this
- pascal (to my knowledge), and the other way tried to hide its use of pointers,
- but hid it's concept from me as well.
-
- 1) How do I find the address of function Bob? Or howbout system functions like
- cos(x)?
-
- 2) Can I pass the pointer directly like this?
- Procedure Something;
- ...
- begin
- Al:=Simps1_3(0,Td,@Bob);
- end;
-
- 3) Why didn't I learn C in the first place? :-)
-
- npstewar@eos.ncsu.edu
- Nathan Stewart
-