🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: valor por defecto de variables no definidas

#1777
From: David Serrano (Hue-Bond)
Date: Fri, 05 Aug 2005 10:37
31 lines
1873 bytes
David Fraga, vie20050805@11:01:15(CEST):
>

Paso mucho de PHP así que no voy a responder a esto pero...


> como en todos los lenguajes, una variable ni declarada ni definida, seria
> FALSE.

$ perl -e 'use strict; use warnings; $c=348;'
Global symbol "$c" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
$ _


$ cat > a.c
int main (void) { if (a) printf ("%d\n", a); return 0; }
$ gcc -Wall -std=c99 -o a a.c
a.c: En la funci `main':
a.c:1: error: `a' undeclared (first use in this function)


$ python2.3 -c "print a"
Traceback (most recent call last):
  File "<string>", line 1, in ?
NameError: name 'a' is not defined
$ _


-- 
 David Serrano
Technical Details
Message-ID: <slrndf6gbn.o9t.responder_solo_en_el_grupo@genus.hue-bond.info>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!not-for-mail
References: <vVFIe.2729369$I96.3248103@telenews.teleline.es>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,459d36b6f4d8c1a5
X-Google-Attributes: gidf86c8,public
X-Google-Language: ENGLISH,UTF8
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!not-for-mail
From: "David Serrano (Hue-Bond)" <responder_solo_en_el_grupo@yahoo.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: valor por defecto de variables no definidas
Date: Fri, 5 Aug 2005 10:37:43 +0000 (UTC)
Organization: I work for myself
Lines: 31
Message-ID: <slrndf6gbn.o9t.responder_solo_en_el_grupo@genus.hue-bond.info>
References: <vVFIe.2729369$I96.3248103@telenews.teleline.es>
NNTP-Posting-Host: 84.77.102.173
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: cormoran.emeteo.local 1123238263 6994 84.77.102.173 (5 Aug 2005 10:37:43 GMT)
X-Complaints-To: emeteo@escomposlinux.org
NNTP-Posting-Date: Fri, 5 Aug 2005 10:37:43 +0000 (UTC)
X-Message-Flag: Visit http://www.debian.org/
X-MSMail-Priority: High
Mail-Copies-To: nobody
User-Agent: slrn/0.9.8.1pl1 (Debian)