Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

The GOTO

Name: Anonymous 2010-10-27 18:31

ENTERPRISE C doesn't need no foolish while() or for() constructs.

extern int printf(const char* format, ...);

void incr(int* inval, int insize)
{
    (*inval) = (*inval) + insize;
}

void decr(int* inval, int insize)
{
    (*inval) = (*inval) - insize;
}

int main(int argc, char *argv[])
{
    if(argc >1) goto handlearguments;
    goto missingarguments;
    handlearguments: {
        int i = 1;
        printnextitem: {
            if(i < argc)
            {
                printf("argv[%d] = %s\n", i, argv[i]);
                incr(&i, 1);
                goto printnextitem;
            }
        }
        return 0;
    }

    missingarguments: {
        printf("Usage: %s <arguments>\n", argv[0]);
        return 1;
    }
    return 0;
}

Name: Anonymous 2010-10-27 18:35

Tanks fur your kewl trix :D Dis goin strait into mah codez.

Name: QUEEN OF /B/ LULZ 2010-10-27 21:55

EPIC WIN OP

Name: ￿???? 2010-10-27 22:09

￿????

Name: Anonymous 2010-10-27 22:24

what's wrong with using i++?

int main(int argc, char *argv[])
{
    if(argc >1) goto handlearguments;
    goto missingarguments;
    handlearguments: {
        int i = 1;
        printnextitem: {
            if(i < argc)
            {
                printf("argv[%d] = %s\n", i, argv[i]);
                i++;
                goto printnextitem;
            }
        }
        return 0;
    }

    missingarguments: {
        printf("Usage: %s <arguments>\n", argv[0]);
        return 1;
    }
    return 0;
}

Name: Anonymous 2010-10-27 23:06

>>5
it's not ENTERPRISE.

Name: Anonymous 2010-10-27 23:44

what is enterprise exactly?

Name: Anonymous 2010-10-28 8:38

Name: Anonymous 2010-10-28 9:12

>>7
some star trek thing

Name: Anonymous 2010-10-28 23:31

IMO, goto is gay. You should almost never NEED a jump. It makes the code hard to follow.

Name: Anonymous 2010-10-28 23:31

IMO, goto is gay. You should almost never NEED a jump. It makes the code hard to follow.

Name: Anonymous 2010-10-28 23:33

>>11
Fuck branching.

Name: Anonymous 2010-10-28 23:37

>>10-11
Why would you need a conditional or a loop?

Name: Anonymous 2010-10-29 4:19

>>12
Fuck branches.

Name: Anonymous 2010-10-29 15:34

>>11
FYI:

for(x;x<y;x++)
{
//nigger shit
}

if the same as

mydick:
//nigger shit
if(x<y){
   x++;
   goto mydick;
}

Name: Anonymous 2010-10-29 17:02

IMO, goto is gay. You should almost never NEED a jump. It makes the code hard to follow.

ITT: people who have never coded in assembly

Name: Anonymous 2010-10-29 18:35

>>16
I can't say that my experience in this regard has lessened my appreciation for structured programming any.

Name: Anonymous 2010-10-30 1:03

>>16
Implying that assembly does not have explicit loop constructs

Name: Anonymous 2010-10-30 1:17

>>18
implying that is the proper way of using implying.

Name: Anonymous 2010-10-30 5:24

>>15
No you idiot, it's the same as this:

x; goto crap;
mydick:
goto shit;
ass: x++;
if(x<y) goto mydick;
goto fuck;
shit:
//nigger shit
goto ass;
fuck: //after loop

Name: Anonymous 2010-10-30 7:08

>>18
implying x86 is the only assembly

Name: Anonymous 2010-10-30 9:32

>>1
incr(&a, -1);
decr(&b, -1);

Name: Anonymous 2010-10-30 11:06

>>21
Implying I wasn't aware of that

Name: Anonymous 2010-10-30 11:45

>>20
congrats you have a compiler error with your shitty code.

Name: Anonymous 2010-10-30 14:15

>>22
void incr(int* inval, unsigned int insize)
void decr(int* inval, unsigned int insize)

Name: Anonymous 2010-10-30 16:52

>>25

incr(&a, UINT_MAX);
decr(&b, UINT_MAX);

Name: Anonymous 2010-10-30 17:17

>>26
Well now you're just being stupid, aren't you? Did you know that UINT_MAX is out of range of a (signed) int by a factor of two?

Name: Anonymous 2010-10-30 17:40

••

Name: Anonymous 2010-10-30 23:17

>>28
Fuck off.

Name: Anonymous 2010-10-31 4:41

>>29
/polecat kebabs/

Name: Anonymous 2010-11-01 10:52

>>30
<spoiler>fucking spoiler, how do they work?</spoiler>

Name: Anonymous 2010-11-01 11:09

>>31
/i don't know, tell me/

Don't change these.
Name: Email:
Entire Thread Thread List