🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: regex, matchs, perl, controlar decimales

#9416
From: "Jesús M. NAVARRO"
Date: Sun, 14 Jul 2002 15:37
25 lines
1495 bytes
Ooops! error.

Jes�s M. NAVARRO wrote:
> Hola, isues:


[...]

> $resultado = ($num1 / $num2);
> 
> # �Que quieres dos decimales al enviar a la salida el resultado? pues...
>     printf "%.2", $resultado;

Me he dejado en estos ejemplos el tipo de dato de la plantilla... todos 
ellos deber�an decir algo del estilo de...

	printf "%.2f", $resultado

...para que se sepa que se trata (en este caso) de un valor de coma flotante
-- 
SALUD,
Jesus
***
jmnavarrol@able.es
***
Technical Details
Message-ID: <3D319AB6.30508@able.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!seanews2.seabone.net!garse!news.iddeo.es!mithrandir.intranet!news
References: <agpdui$h9f$1@localhost.localhost> <3D319619.6070605@able.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,b809275dbda7b1e8
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-07-14 09:16:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!seanews2.seabone.net!garse!news.iddeo.es!mithrandir.intranet!news
From: "Jesús M. NAVARRO" <jmnavarrol@able.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: regex, matchs, perl, controlar decimales
Date: Sun, 14 Jul 2002 17:37:26 +0200
Organization: Iddeo - Retevisi�n
Lines: 26
Message-ID: <3D319AB6.30508@able.es>
References: <agpdui$h9f$1@localhost.localhost> <3D319619.6070605@able.es>
NNTP-Posting-Host: 212.97.185.73
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3
X-Accept-Language: en