Path: 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:Date: 3 Aug 88 11:18:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Info-Modula2 Distribution List Organization: The Internet Lines: 49 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