Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!decvax!cg-d!krishna From: krishna@cg-d.UUCP Newsgroups: comp.lang.c Subject: PASCAL like C with no sweat Message-ID: <257@cg-d.UUCP> Date: Fri, 13-Feb-87 13:14:56 EST Article-I.D.: cg-d.257 Posted: Fri Feb 13 13:14:56 1987 Date-Received: Sat, 14-Feb-87 14:20:16 EST Organization: Compugraphic, Wilmington, Mass. Lines: 50 I am new to this newsgroup and am not sure if there has been an exchange of information on mapping PASCAL to C and vice versa. I migrated to C from PASCAL, and to help the transition, I developed these macros. But I have continued to use them because they have made my *C* programs eminently more readable. Making the transition back from hard core C may be difficult, but for those of ye who are new to C this may help... /* Cut here -------------------------- ereh tuC */ #define begin { #define end } #define true 1 #define false 0 #define TRUE true #define FALSE false /* Control Structures */ #define If if( #define Then ) #define Else else #define While while( #define Do ) #define For for( /* Misc Stuff */ #define boolean char #define and && #define or || #define not ! #define record { /* Cut here ------------------------- ereh tuC */ /* Sample uses ... */ While true Do ... For i=0; i < Junk; i++ Do If (x < 10) and not found Then begin fdgkgj; sdfkslf; end Else dkfhgkjfdhg; See .. No extraneous '(' and ')'. Makes the code look really clean. ------ In real life: B. C. Krishna @ Compugraphic Corp. MA. UUCP : ...decvax!cg-d!krishna