🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Czy zmienna jest zdefiniowana?

#39600
From: Vax
Date: Sat, 22 Apr 2006 18:35
21 lines
1591 bytes
Użytkownik "Paweł Banasiak" <banasiak@NOSPAMbanasiak.net> napisał w 
wiadomości news:e2dsfo$1jp3$1@news2.ipartners.pl...
> Użytkownik <javer_dd@op.pl> napisał w wiadomości
> news:2907.00000131.444a6fec@newsgate.onet.pl...
>> Witam,
>> Jak rozpoznaje się czy zmienna jest zdefinowana czy nie?
>> var tab=new Array(2);
>> tab[0]=100
>> alert(tab[0]+tab[1]);  //zwraca:100undefinied
>> Ja chciałbym wcześniej stwierdzić czy tab[1] ma jakąś wartość czy jest
>> niezdefiniowany.
>> Z góry dziękuję,
>> Javer_DD
>
> http://pl.php.net/isset
> http://pl.php.net/empty

php to lubi zaskakiwac...

v. 
Technical Details
Message-ID: <e2dsqe$1k1l$1@news2.ipartners.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.ipartners.pl!ipartners.pl!not-for-mail
References: <2907.00000131.444a6fec@newsgate.onet.pl> <e2dsfo$1jp3$1@news2.ipartners.pl>

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.ipartners.pl!ipartners.pl!not-for-mail
From: "Vax" <taki.ego@wa.la>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Czy zmienna jest zdefiniowana?
Date: Sat, 22 Apr 2006 20:35:26 +0200
Organization: Internet Partners
Lines: 23
Message-ID: <e2dsqe$1k1l$1@news2.ipartners.pl>
References: <2907.00000131.444a6fec@newsgate.onet.pl> <e2dsfo$1jp3$1@news2.ipartners.pl>
NNTP-Posting-Host: 217.153.196.41
X-Trace: news2.ipartners.pl 1145730702 53301 217.153.196.41 (22 Apr 2006 18:31:42 GMT)
X-Complaints-To: abuse@ipartners.pl
NNTP-Posting-Date: 22 Apr 2006 18:31:42 GMT
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit