Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!kent From: kent@swrinde.nde.swri.edu (Kent D. Polk) Newsgroups: comp.sys.amiga.tech Subject: Re: Can you nest subroutines in C? Message-ID: <17863@swrinde.nde.swri.edu> Date: 29 Jun 89 17:21:23 GMT References: <4495@crash.cts.com> <18161@usc.edu> Reply-To: kent@swrinde.UUCP (Kent D. Polk) Organization: Southwest Research Institute, San Antonio, Texas Lines: 21 In article <18161@usc.edu> papa@pollux.usc.edu (Marco Papa) writes: [...] >Not really a test of a language at all. Can you have "procedure pointers" >in M2 (i.e., variables that hold addresses of subroutines, and that get called >just by referencing the variable, and that of course can be assigned to)? >As I recall Pascal did not allow that. This is one of the features of C that >currently I could not live without. Some versions of Pascal do allow this. Hewlett Packard Pascal does for one. It has to use a 'call' mechanism with the variable name as a parameter. I've used this to make arrays of functions for state machines. It is also a modular Pascal which looks surprisingly like M2 but not quite so heavily typed. Not that this does any of us Amigans any good though. :-( ======================================================= Kent Polk - Southwest Research Institute kent@swrinde.nde.swri.edu ------------------------------------------------------- "Anything worth doing is worth overdoing" =======================================================