🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Czy zmienna jest zdefiniowana?

#39599
From: Paweł Banasiak
Date: Sat, 22 Apr 2006 18:25
18 lines
1458 bytes
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

-- 
Paweł Banasiak
www.all4webmasters.pl 
Technical Details
Message-ID: <e2dsfo$1jp3$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>

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: Paweł Banasiak <banasiak@NOSPAMbanasiak.net>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Czy zmienna jest zdefiniowana?
Date: Sat, 22 Apr 2006 20:25:58 +0200
Organization: Internet Partners
Lines: 20
Message-ID: <e2dsfo$1jp3$1@news2.ipartners.pl>
References: <2907.00000131.444a6fec@newsgate.onet.pl>
NNTP-Posting-Host: 217.8.165.198
X-Trace: news2.ipartners.pl 1145730360 53027 217.8.165.198 (22 Apr 2006 18:26:00 GMT)
X-Complaints-To: abuse@ipartners.pl
NNTP-Posting-Date: 22 Apr 2006 18:26:00 GMT
X-RFC2646: Format=Flowed; Original
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