[Xcb] Why are predefined atoms not static constants?
Barton C Massey
bart at cs.pdx.edu
Mon Aug 16 12:27:56 PDT 2010
In message <8762zcm64b.fsf at keller.adm.naquadah.org> you wrote:
> On Sun, Aug 15 2010, Ulrich Eckhardt wrote:
> > I know, there are a bunch of reasons for either variant, I just
> > wanted to ask which of them were the reasons for doing things
> > this way here. Can anyone enlighten me?
>
> This is deprecated. Recent libxcb defines predefined atoms in
> xproto.h as an enum.
"The primary purpose of the DATA statement is to give names
to constants; instead of referring to PI as
3.141592653589797, at every appearance, the variable PI
can be given that value with a DATA statement, and used
instead of the longer form of the constant. This also
simplifies modifying the program, should the value of PI
change." -- Xerox FORTRAN manual, quoted at
http://www.petting-zoo.net/~deadbeef/archive/3128.html
So there you have it. It was in case the value of PRIMARY
should ever change. :-)
Bart
More information about the Xcb
mailing list