Article View: es.comp.os.linux.programacion
Article #11228Re: [Novato] Problemas con if en C
From: Mick
Date: Sun, 16 Dec 2001 11:47
Date: Sun, 16 Dec 2001 11:47
15 lines
1714 bytes
1714 bytes
urbano Iglesias wrote:
> Soy consciente de que el problema es est�pido pero llevo poco con C y me
> pasa lo siguiente. Tengo una sentencia del tipo:
> if (a = =0.) { .....}
> a es una variable tipo double. A�ad� el punto al cero para indicar que es
> del mismo tipo. El programa falla aqu�. Si el 0 no lleva el punto, tampoco
> funciona. �Es incorrecto comparar dos variables float en una comparaci�n?.
> He buscado en tres manuales pero no encuentro nada de nada.
> Gracias
if (a==0) {} // Los dos iguales juntos no puede
// haber un espacio en el medio.
Salud2 !!!!
Technical Details
Message-ID:
<OR%S7.500534$fH3.2098943@telenews.teleline.es>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!caladan.arrakis.es!telenews.teleline.es!not-for-mailReferences:
<9vhmgg$oen$1@news.ya.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,68360ef397b8b55b X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-12-16 04:47:13 PST From: Mick <michaell@NOSPAMteleline.es> Subject: Re: [Novato] Problemas con if en C Newsgroups: es.comp.os.linux.programacion References: <9vhmgg$oen$1@news.ya.com> Lines: 17 Organization: Mick Corp User-Agent: KNode/0.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit Message-ID: <OR%S7.500534$fH3.2098943@telenews.teleline.es> Date: Sun, 16 Dec 2001 11:47:58 GMT NNTP-Posting-Host: 10.20.31.4 X-Complaints-To: usenet@teleline.es X-Trace: telenews.teleline.es 1008503278 10.20.31.4 (Sun, 16 Dec 2001 12:47:58 MET) NNTP-Posting-Date: Sun, 16 Dec 2001 12:47:58 MET X-Received-Date: Sun, 16 Dec 2001 12:47:58 MET (telenews.teleline.es) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!caladan.arrakis.es!telenews.teleline.es!not-for-mail