From: "Salvador Eduardo Tropea (SET)" To: bhodge AT gpu2 DOT srv DOT ualberta DOT ca, djgpp AT delorie DOT com Subject: Re: Borland library macro equivalent? Date: Fri, 25 Oct 1996 15:51:34 +0300 (GMT) Message-ID: <9610251551.aa07674@ailin.inti.edu.ar> Hi Blaine: >Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: >: #define max(a,b) ({ typeof(a) _tmp_a = (a); \ >: typeof(b) _tmp_b = (b); \ >: (_tmp_a > _tmp_b) ? _tmp_a : _tmp_b; }) >So then the following code would be legal? >x={ int s, c; s=sin(a); c=cos(a); s*s*y+s*c*y+c*c*y; }; >Is this legal under other languages tooor is it just a DJGPP specific >thing? >(Don't rack your brain to hard at what it does, I just came up with a >random example :-) The not standard thing in the first example is the typeof(a) used to declare the var (I could be wrong). SET ******************************************************************************** Salvador Eduardo Tropea (SET) - salvador AT inti DOT edu DOT ar Work: INTI (National Institute of Industrial Technology) Sector: ICE (Electronic Control & Instrumentation) Post (Home): Curapaligue 2124 - Caseros (1678)- Buenos Aires - Argentina