🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #12095

Re: Duda de funcion en Linux

#12095
From: Tomas Sanchez Santos
Date: Tue, 04 Sep 2001 12:25
32 lines
2243 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

En es.comp.os.linux.programacion, Raul escribi�:

>	tengo este programa que compilado en Win funciona correctamente, pero
>al pasarlo a Linux me dice que no entiende la funcion "fmod(a,b)" de
>"<math.h>" para calcular el modulo, que segun el manual dice que es ANSI
>C, otros dicen que el modulo es "a % b", pero no funciona con ninguno .

	El operador % devuelve el resto como un numero entero. La funcion
	fmod devuelve el resto como un numero real (double). 

	Lo que pasa es que para utilizar la librer�a matem�tica, tienes que
	utilizar la opci�n -lm cuando compiles el programa, para que se 
	enlace con dicha librer�a. Hazlo asi y veras como funciona.
	
Saludos
- -- 
/----------------------------------------------------------------------\
|  Tomas Sanchez Santos	  tsanchez  at  escomposlinux . org            |
|  Clave publica: http://perso.wanadoo.es/tomas-sanchez/tomas-gpg.asc  |
\----------------------------------------------------------------------/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7lMhW4IhFOpHaScYRAqLaAKCUi5gVLKScGIN/WZVVp0YyJsgWOQCeKFoP
2XzaWoGO8oosFM6Pdsp3rZ8=
=zb9T
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn9p9i2h.l9.tsanchez@mortadelo.casa>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!62-37-200-53.dialup.uni2.ES!not-for-mail
References: <3B93E9A9.8C67945@grupobbva.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,6e84682e8b664c4b
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-09-04 09:52:30 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!62-37-200-53.dialup.uni2.ES!not-for-mail
From: tsanchez@escomposlinux.org (Tomas Sanchez Santos)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Duda de funcion en Linux
Date: Tue, 4 Sep 2001 14:25:58 +0200
Lines: 32
Message-ID: <slrn9p9i2h.l9.tsanchez@mortadelo.casa>
References: <3B93E9A9.8C67945@grupobbva.net>
Reply-To: tsanchez@escomposlinux.org
NNTP-Posting-Host: 62-37-200-53.dialup.uni2.es (62.37.200.53)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 999622348 5180684 62.37.200.53 (16 [43504])
X-Orig-Path: tsanchez
User-Agent: slrn/0.9.6.2 (Linux)