On Monday 06 February 2006 11:09 am, Gabriel Sechan wrote:
> From: Lan Barnes <[EMAIL PROTECTED]>
>
> >A story that rivals, nay, surpasses anything that I saw in the New York
> >financial market (where management stupidity, pettiness, and venality is
> >a given) or during my stint in Y2K projects.
> >
> >My only sorrow is that understanding the monumental stupidity and lack
> >of foresight requires a level of geekhood. Otherwise, I'd share it with
> >my civilian friends.
> >
> >Should the KPLUG web site host a place for these treasures?
>
> It already has a host-  www.thedailywtf.com
>
> Gabe

Hey that wtf stuff looks really good. I guess I should send them
some true code from hell. 

BobLQ

Here is a lovely little snippet
/* Subroutine */ int intval_0_(n__, z__, text, j, aj, alf, txtwd)
int n__;
integer *z__, *text, *j;
doublereal *aj;
char alf[4];
integer *txtwd;
{

   [snip] ... 

    /* Parameter adjustments */
    --z__;
    --text;
    if (aj) {
    --aj;
    }
    if (txtwd) {
    --txtwd;
    }

    /* Function Body */
    switch(n__) {
    case 1: goto L_reaval;
    case 2: goto L_alfval;
    case 3: goto L_txtwvl;
    }

    intg = TRUE_;
    goto L999;
/* ---- #*************** */

L_reaval:
/* ---- # purpose: obtain a floating point value from user */
    intg = FALSE_;
L999:
    prompt_(&z__[1], &text[1], &z__[lincom_1.wrkp], &z__[lincom_1.outp]);
    ia = 1;
/* ---- # eat leading blanks: */
    while(z__[lincom_1.outp - 1 + ia] == blankw__ && ia <= lincom_1.extchr) {
    ++ia;
/* ---- # found a number, eat it up: */
    }
    while(z__[lincom_1.outp - 1 + ia] != blankw__ && ia <= lincom_1.extchr) {
    ++ia;
    }
    pnum = ia;

etc ...

for hundreds of lines. 

Note the really neat use of the switch statement. If n__ != 1, 2, or 3 it falls 
through
to the goto L999; which is how the flag intg=TRUE_ gets set for the code 
associated
with L_reaval ... I suspect this code resulted from a FORTRAN computed goto. 

Ah that was "Back in the day ..."

The horrible thing is that after you look at this stuff long enough it
starts to make a weird sort of sense. That is when  you know that
your brain is really being messed up badly by even trying to work
with code that looks like this. God only knows what the next code
I write for myself with look like. 

Sigh,

BobLQ




-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to