🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39435

eval i zera na początku

#39435
From: Paweł
Date: Thu, 13 Apr 2006 18:28
10 lines
1259 bytes
Witam !

Chciałem zamienić tekst na liczbę. Zastosowałem więc funkcję eval.
1. eval("04") daje w wyniku 4
2. eval("04.6917") powoduje błąd
3. eval("4.6917") daje w wyniku 4.6917

W jaki sposób teksty takie jak w p.2  należy zamieniać na liczbę ?

Paweł
Technical Details
Message-ID: <e1m591$k2f$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Paweł <pawel.neo@neostrada.pl>
Newsgroups: pl.comp.lang.javascript
Subject: eval i zera na początku
Date: Thu, 13 Apr 2006 20:28:29 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 13
Message-ID: <e1m591$k2f$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: cok246.neoplus.adsl.tpnet.pl
X-Trace: atlantis.news.tpi.pl 1144952929 20559 83.31.190.246 (13 Apr 2006 18:28:49 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Thu, 13 Apr 2006 18:28:49 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit