Whole document tree
4.11 Complex Numbers
GNU C supports complex data types. You can declare both complex integer
types and complex floating types, using the keyword
For example, `__complex__ double x;' declares
To write a constant with a complex data type, use the suffix `i' or
`j' (either one; they are equivalent). For example,
To extract the real part of a complex-valued expression exp, write
The operator `~' performs complex conjugation when used on a value with a complex type.
GNU CC can allocate complex automatic variables in a noncontiguous
fashion; it's even possible for the real part to be in a register while
the imaginary part is on the stack (or vice-versa). None of the
supported debugging info formats has a way to represent noncontiguous
allocation like this, so GNU CC describes a noncontiguous complex
variable as if it were two separate variables of noncomplex type.
If the variable's actual name is A future version of GDB will know how to recognize such pairs and treat them as a single variable with a complex type.
This document was generated by root on January, 30 2002 using texi2html |