l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Sep 07 14:32

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] C99 - Initializing complex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] C99 - Initializing complex

Must both parts of a complex variable be initialized:

   long double complex z = 0.0L + 0.0L*I;           (i)

or does only one part need to be initialized?

   long double complex z = 0.0L;                    (ii)

A test program shows that (ii) "works", but I couldn't find an authoritative
answer in the C99 standard.  Although I have no intention of using anything
but Linux, I still don't want to rely on GNU extensions (as much as

BTW, my copy of the C99 standard is from August 3, 1998 and appears to be a
"pre-release".  I'm a little surprised that a Google search for "C99
standard" just doesn't give a copy of the standard the way a Google search
for "US Constitution" yields the Constitution.  Where is the official copy of
this standard?


Make everything as simple as possible, but no simpler. -- Albert Einstein
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.