🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #248

Re: Can you nest subroutines in C?

#248
From: David King
Date: Thu, 29 Jun 1989 04:23
35 lines
2185 bytes
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.

	Pascal did not allow procedure variables since it made the compiler
more difficult which Wirth didn't want (of course everyone in my undergrad
compilers course implemented procedure variables with no help).  Modula-2
does allow using procedure variables in the same manner as C.  I definately
could not live with out them as I use them in my IDCMP routines to implement
pseudo-object-oriented design.  

	My only complaint with Modula-2 is that there is no pre-initializing
of data.  But the cleaner initialization and termination system sort of 
makes up for it.  Since each is useful for different things I have both Lattice
and M2Sprint, but I'm weird.

	No religious wars or I'll start arguing for an OCCAM compiler :-)
		-David

>
>-- Marco Papa 'Doc'
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
>"There's Alpha, Beta, Gamma, Diga and Caligari!" -- Rick Unland
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- 
 David King - 	FROM Disclaimers IMPORT Standard;
Georgia Insitute of Technology, Atlanta Georgia, 30332
uucp: ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!dsking
ARPA: dsking@pyr.gatech.edu
Technical Details
Message-ID: <8608@pyr.gatech.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!gatech!gitpyr!dsking
References: <4495@crash.cts.com> <18161@usc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!gatech!gitpyr!dsking
From: dsking@pyr.gatech.EDU ( David King)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Can you nest subroutines in C?
Summary: M2 Discussion
Message-ID: <8608@pyr.gatech.EDU>
Date: 29 Jun 89 04:23:23 GMT
References: <4495@crash.cts.com> <18161@usc.edu>
Reply-To: dsking@pyr.UUCP ( David King)
Organization: Georgia Institute of Technology
Lines: 35