delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/28/05:40:42

Date: Thu, 28 Aug 1997 12:38:58 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: complex numbers, correct ??
In-Reply-To: <Pine.SGI.3.91.970827160403.12574A-100000@atmosp.physics.utoronto.ca>
Message-ID: <Pine.SUN.3.91.970828123543.10704J-100000@is>
MIME-Version: 1.0

On Wed, 27 Aug 1997, Peter Berdeklis wrote:

> By the way, if the code fragment you give above works on other compilers 
> dump them!  This would be a compiler bug.

GCC supports complex type in C programs also, but there's no need to dump 
it ;-).

It's just that the usage in the posted program is incorrect (if the 
poster meant to write a C program).  The declaration needs to be like 
this:

	__complex__ double a;

and you need to use the __real__ and __imag__ operators to access the two 
components, e.g. to pass them to `printf'.

See the GCC docs (under "C Extensions") for more info.

- Raw text -


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