Article View: comp.lang.modula2
Article #4352ShortCompare(M2,C)
From: Michael Drechsler
Date: Wed, 03 Aug 1988 11:18
Date: Wed, 03 Aug 1988 11:18
50 lines
2462 bytes
2462 bytes
Hello all,
I need a short objective compare of the possibilities of M2 and C but I
don't know much about C (when I see a program then I only can say that
it is written in C or not :-) and I currently don't have enough time to
read through a whole C book. So I ask you to help me please. I have
tried to list the features of the two languages, from the view of a M2
programmer. Would you please be so kind and fill in the missing entries
(or correct them) and then send the list to HPA111@DE0HRZ1A.BITNET
given in Modula-2 | equivalent in C
---------------------------|--------------------------------
CONST declarations |
TYPE declarations |
enumeration types | enum
subrange types |
SET types |
ARRAY types | yes
RECORD types | struct
variant RECORDs | union
PROCEDURE types |
VAR declarations |
|
IF THEN ELSE END | if (test) stmt1 else stmt2
ELSIF | no
FOR DO END | for (init;test;reinit) stmt
WHILE DO END | while (test) stmt
REPEAT UNTIL |
LOOP EXIT END |
CASE OF ELSE END | swith case default:
WITH DO END |
|
internal procs & functions | yes
recursive procs | yes
call by value | yes
call by reference | yes, with address operator
open array parameters |
|
separate compilation | no, but external proc compil.
something like modules | no
|
low levels for | yes
system programming |
address computation | yes
coroutines and processes | no
---------------------------|---------------------------------
??? | ??? (something else, that is not
| defined in M2)
Thanks alot for your help,
Michael
Technical Details
Message-ID:
<INFO-M2%88080315570633@DB0TUI11>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!DE0HRZ1A.BITNET!HPA111Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!DE0HRZ1A.BITNET!HPA111 From: HPA111@DE0HRZ1A.BITNET (Michael Drechsler) Newsgroups: comp.lang.modula2 Subject: ShortCompare(M2,C) Message-ID: <INFO-M2%88080315570633@DB0TUI11> Date: 3 Aug 88 11:18:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Info-Modula2 Distribution List <INFO-M2%UCF1VM.bitnet@jade.berkeley.edu> Organization: The Internet Lines: 49