🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can you nest subroutines in C?

#302
From: Wade Bickel
Date: Sat, 01 Jul 1989 06:36
36 lines
2018 bytes
papa@pollux.usc.edu (Marco Papa) writes:
>In article <4495@crash.cts.com> wade@pnet01.cts.com (Wade Bickel)
>writes: 
>> So far I have found nothing I could do in C that I could not
>>do in M2.  To me this is the test of a Language.
>
>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.
>

        In a word, YES.  Modula-2 is not PASCAL.  It allows pointer math and
procedure pointers, and all the other goodies of this nature not included in
PASCAL.  It also has a cleaner stucture definition system, better prototyping,
and much better (Language defined, not compiler specific) separate compilation
scheme.

        As I said in my earlier posting, lack of the ability to nest
subroutines is the first concept I've found which could be translated, in
either direction.  There are many things which I like about C, such as pre-
initialization of data, but none are conceptual issues, just technical ones.

        Please do not continue to use your PASCAL experiances to pre-evaluate
Modula-2.  I did not like PASCAL either.  M2 shares most of PASCALs syntax,
but even here it is significantly different.


                                                Thanks,

                                                        Wade.

UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!wade
ARPA: crash!pnet01!wade@nosc.mil
INET: wade@pnet01.cts.com
Technical Details
Message-ID: <4524@crash.cts.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!hacgate!gryphon!crash!pnet01!wade

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!hacgate!gryphon!crash!pnet01!wade
From: wade@pnet01.cts.com (Wade Bickel)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Can you nest subroutines in C?
Message-ID: <4524@crash.cts.com>
Date: 1 Jul 89 06:36:13 GMT
Sender: news@crash.cts.com
Organization: People-Net [pnet01], El Cajon CA
Lines: 36