Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!mcnc!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: net.lang.c Subject: Re: What should be added to C Message-ID: <385@dg_rtp.UUCP> Date: Wed, 4-Jun-86 17:08:12 EDT Article-I.D.: dg_rtp.385 Posted: Wed Jun 4 17:08:12 1986 Date-Received: Sat, 7-Jun-86 00:19:01 EDT References: <1462@mmintl.UUCP> <5498@alice.uUCp> <1497@mmintl.UUCP> <450@cad.BERKELEY.EDU> <1518@mmintl.UUCP> Lines: 28 Summary: #begdef is a puny change compared to #if sizeof > franka@mmintl.UUCP (Frank Adams) >> faustus@cad.UUCP >>You can write arbitrarily large macros by putting backslashes at the end of >>lines. This is ugly but it works. > > This doesn't let you use "#if" in the body of the macro, as my example would > require. To fully explicate, my example would be: > > #begdef copy(to, from, number) > #if sizeof(from) % WORD_SIZE == 0 > copyword(to, from, number * sizeof(from) / WORD_SIZE) > #else > strncpy(to, from, number * sizeof(from)) > #endif > #enddef Along with multi-line-ness, this example has snuck in a *very* large change in the language. In particular, #if sizeof(from) In order to evaluate this, the preprocessor would need to know (oddly enough) the size of "from". Since the preprocessor currently does not even know full C syntax, this is a *very* radical change in the language. -- Wayne Throop !mcnc!rti-sel!dg_rtp!throopw