Article View: es.comp.os.linux.programacion
Article #16109Re: [POLEMICA CON GOTO] (Era-->Re: Saltos en bash)
From: batsman
Date: Mon, 08 May 2000 00:00
Date: Mon, 08 May 2000 00:00
61 lines
3389 bytes
3389 bytes
-----BEGIN PGP SIGNED MESSAGE-----
>>>> El 5 May 2000 10:21:19 GMT, J.A. Gutierrez
>>>> aporre� su teclado, y logr� este curioso efecto:
>batsman <batsman@simpsons.for.ever> wrote:
>
>: Sinceramente, a m� me parece m�s legible el primero, de verdad. Es
>: que el goto me asusta; es una sentencia muy penetrante, da miedo la
>: forma en que modifica el flujo del programa...
>
> si te asusta goto, setjmp/longjmp te tiene que aterrar... :-)
Esta es la raz�n de todos mis temores:
#include <stdio.h>
#include <malloc.h>
main(togo,toog)
int togo;
char *toog[];
{char *ogto, tgoo[80];FILE *ogot; int oogt=0, ootg, otog=79,
ottg=1;if ( togo== ottg) goto gogo; goto goog; ggot:
if ( fgets( tgoo, otog, ogot)) goto gtgo; goto gott;
gtot: exit(); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
goto oggt; goto ggot; ogog: if ( !ogot) goto gogo;
goto ggto; gtto: printf( "%d goto \'s\n", oogt); goto
gtot; oggt: if ( !memcmp( ogto, "goto", 4)) goto otgg;
goto gooo; gogo: exit( ottg); tggo: ootg= strlen(tgoo);
goto tgog; oogo: --ootg; goto togg; gooo: ++ogto; goto
oogo; gott: fclose( ogot); goto gtto; otgg: ogto= ogto +3;
goto ogtg; tgog: ootg-=4;goto togg; gtgo: ogto= tgoo;
goto tggo; ogoo: ootg-=3;goto gooo; goog: ogot= fopen(
toog[ ottg], "r"); goto ogog; ggto: ogto= tgoo; goto
ggot;}
del ioccc de 1987, hines.c.
- --
_ _
| |__ __ _| |_ ___ _ __ ___ __ _ _ __
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
Real email: batsman dot geo at yahoo dot com
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Public key via email: send mail with Subject: [PGPKEY]
iQEVAwUBORcUIb0Y27yr0iefAQGrswf9GSIRVIlVp3lKc6dKsoc5atWUZJMueUBZ
hcGRSlSOFoC7cRIczgLbeUMrVjFNJ5XtbyACga2Uzch5iNbbqw2RTaeTEUiIgA3r
nsVcQorg5tdV+YyJ4pa6DfP5PXbNFqWyALqNdUAnp6jc2m/rtFv2k4x5MNQsfArc
/B6+IkAapDSd/V5hqteQW/qvr1ph8rNINJpDwdW61XHO80y6eGXiS0i0HeChBpiN
wStBh1YKDwaWU1lcaBsE/cc5daxvvqvYzpvuCotK+YjnxGFT8uYyO/OtH6vIVRMY
IwliDgPd96u/6N/A6kravIAFRrVAq4MmX3QTmPD3JgWq71OoNLKbLA==
=Le17
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<7747f8.ji1.ln@simpsons4ever>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<slrn8gtnu0.pc.scandisk@localhost.localdomain> <aodne8.je1.ln@simpsons4ever> <871z3k4slh.fsf_-_@eb2ebu.ampr.org> <tkuse8.bp1.ln@simpsons4ever> <8eu7av$471$3@news.unizar.es>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,e073e16083571582 X-Google-Attributes: gidf86c8,public From: batsman@simpsons.for.ever (batsman) Subject: Re: [POLEMICA CON GOTO] (Era-->Re: Saltos en bash) Date: 2000/05/08 Message-ID: <7747f8.ji1.ln@simpsons4ever> X-Deja-AN: 620731971 Content-Transfer-Encoding: 8bit References: <slrn8gtnu0.pc.scandisk@localhost.localdomain> <aodne8.je1.ln@simpsons4ever> <871z3k4slh.fsf_-_@eb2ebu.ampr.org> <tkuse8.bp1.ln@simpsons4ever> <8eu7av$471$3@news.unizar.es> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@news.wanadoo.es X-Trace: m2newsread.uni2.es 957806767 62.36.40.142 (Mon, 08 May 2000 19:26:07 MET DST) Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/ Mime-Version: 1.0 User-Agent: slrn/0.9.5.3 (UNIX) Reply-To: see_signature-mira_firma NNTP-Posting-Date: Mon, 08 May 2000 19:26:07 MET DST Newsgroups: es.comp.os.linux.programacion