delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/28/13:33:33

Message-Id: <3.0.6.32.19990228133308.009afd00@pop.globalserve.net>
X-Sender: derbyshire AT pop DOT globalserve DOT net
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Sun, 28 Feb 1999 13:33:08 -0500
To: djgpp AT delorie DOT com
From: Paul Derbyshire <pderbysh AT usa DOT net>
Subject: Re: sin, cos ??
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

At 07:24 PM 2/28/99 +0200, you wrote:
>
>On Sun, 28 Feb 1999, Paul Derbyshire wrote:
>
>> const long double pi = 4*atan(1);
>
>It won't work in C, and calling a function instead of using a manifest 
>constant seems like a waste.
>
>> Can Nate make this work without side effect problems?
>> 
>> #define MAX(a,b) (((a) > (b)) ? (a) : (b))
>
>Ah, but Nate's macro wasn't like this: it only used the arguments once.

I am quite aware of that. :-)

Macros can have problems, subtle ones that might not show up until
run-time. Template problems, if subtle in the source code, become glaringly
obvious in the 400 lines of scary error messages from "cc1plus" followed by
"confused by earlier errors, bailing out". :-)

-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net
_____________________ ____|________     Paul Derbyshire     pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019