delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/12/01:02:31

Xref: news2.mv.net comp.os.msdos.djgpp:8521
From: rbachtel AT mailman DOT ghgcorp DOT com (Jeff)
Newsgroups: comp.os.msdos.djgpp
Subject: function pointers
Date: 11 Sep 1996 23:25:54 GMT
Organization: GHG Internet Services
Lines: 20
Message-ID: <517hq2$hqp@news.ghgcorp.com>
NNTP-Posting-Host: dialupline144.ghgcorp.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I wish to create a variable, such that a function (with parameters)
can be assigned to it.

For example, in TurboP7.0:
type
    ProcPTRType=procedure(x,y : integer);
var
  p1,p2 : ProcPTRType;
begin
  p1:=goober; (Where goober is a function)
  p1(13,14);

I know there is a way to do this in DJGPP 2.0, can somebody just tell me 
how?

Thanks for any and all help,
Jeff
novice C programmer
rbachtel AT ghgcorp DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019