[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] pic: nasty little trap in function!
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] pic: nasty little trap in function! |
Date: |
Mon, 2 Mar 2015 23:34:49 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> define d2r {$1*pi/180}
>
> t = d2r(15.0+0.5*i)
"define" being a (text-replacement) macro facility,
this can be understood as follows:
t = d2r(15.0+0.5*i)
= 15.0+0.5*i*pi/180
so a better definition would have been:
define d2r {($1)*pi/180}
I think similar pitfalls exist with cpp macros.