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

The x-Done Loop

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-07 7:58

This is a construct that is very useful to avoid either a redundant check or a goto. This...
for(a;b;c) {
 expr1;
 if(d) {
  expr4;
  goto done;
 }
 expr2;
}
 expr3;
done:

...becomes...
for(a;b;c) {
 expr1;
 if(d) {
  expr4;
  break;
 }
 expr2;
} done {
 expr3;
}


where the intent is for statements in a done clause immediately following a loop to be executed if and only if the loop was exited via its termination condition being reached. This also generalises for while() and do-while, here using some common examples.

while(*j) {
 if(*j++ == k) {
  u = v + k;
  break;
 }
} done
 u = v - k;


do {
 if(f(a[i]))
  break;
} while(a[i++]) done {
 g();
}


Discuss.

Name: Anonymous 2013-01-09 3:00

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-09 8:08

>>36
One is enough.

Name: Anonymous 2013-01-09 9:38

It would be great if Cudder killed himself out of 4chan forever.

Name: Anonymous 2013-01-09 13:50

>>40
Culver easily, even though she supports kike languages (FIOC, javashit), that can be easily ignored. Cudder's rabid fanboy support of kike chip architecture on the otherhand is seriously harmful, also unacceptable.

Name: Anonymous 2013-01-09 14:06

>>43,44
I agree.

Name: Anonymous 2013-01-09 14:09

>>43
*herself

Also fuck you she's my platonic love

Name: Anonymous 2013-01-09 14:33

>>46
Fuck you, I saw her first.
I don't want platonic love I want to pump her ass full of cum while she declaims the Intel manuals and then we shall take a romantic walk on the Nevskaya Perspektiva and do some shopping.

Name: Anonymous 2013-01-09 14:40

>>46,47
Here's Cudder: http://pigroll.com/img/14-f-cali.jpg

He used to pretend he was three different girls. That was more pathetic than I thought possible.

I miss the old /prog/.

Name: Anonymous 2013-01-09 14:43

>>48
He used to pretend he was three different girls.
He even had a car accident with two of them, in Osaka.

Name: Anonymous 2013-01-09 14:45

>>48
I AM NOT CLICKING ON THAT LINK, FAGSHIT!

Name: Anonymous 2013-01-09 14:45

>>48
e/b/in pic, reddit/b/ro

Name: Anonymous 2013-01-10 6:38

>>35

Why such a poor choice of operator? call/CC is less primitive and less powerful then shift and reset. If you want callCC you can implement it with shift and reset.

I am going to puke over Jesus now.

Name: Anonymous 2013-01-10 7:15

>>52
You can implement shift and reset with call/cc as well.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-10 7:31

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-10 7:31

Name: 27,28 2013-01-10 8:42

>>54,55
How so? I'd say it's far cleaner to write a separate function like 'searchuranus' then branch depending on its return value, rather than using what you've proposed. Performing an extra comparison on a null pointer really isn't a huge issue, especially with high level languages where clarity and the use of idiomatic forms is far more important than unnoticeable performance gains. If you run a large program through a profiler and find that it performs poorly, chances are it's because an inefficient data structure was used, rather than using two comparisons where one would have been sufficient.

Name: Anonymous 2013-01-10 8:43

>>53
They are equally powerful? Can I haz paper?

Name: Anonymous 2013-01-10 12:55

>>54,55
Are you frustrated that you keep double-posting?

Name: Anonymous 2013-01-10 17:14

>>54-55
Is it true that you were 3 girls, Cudder?
Will one of them marry me?

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-11 4:35

>>58
Does this board have transactional semantics? What happened to the A in ACID?

>>59
I am a middle-aged woman. Not single.

Name: Anonymous 2013-01-11 19:49

>>60
Are you in a lesbian relationship with FFP?

Name: Anonymous 2013-01-11 20:06

>>60
I knew you were not single. I still have a crush on you.

Name: Anonymous 2013-01-11 20:08

>>60 oh wow, i thought that was just made up. So it's not Mr Satori at all, then, Mrs Atari..? and there is hope for /prog/ yet.... ;)

Name: Anonymous 2013-01-11 21:28

>>60
please tell us more about yourself.

Name: Anonymous 2013-01-11 21:57

>>60
lol, married? Are you fucking stupid? What's next, you drink socially and have a facebook?

Name: Anonymous 2013-01-11 22:06

>>65
Poor wretch.

Name: Anonymous 2013-01-11 22:29

>>66
Yeah, poor Cudder.

Name: Anonymous 2013-01-12 0:08

>>60
when did you have your operation then?

Name: Anonymous 2013-01-12 4:19

I wonder if cudder is polygamist relationship.

Name: Anonymous 2013-01-12 4:37

She has that tremendous capacity to ignore trolls and ad hominem.

Name: Anonymous 2013-01-12 7:26

>>53
Yes but you  need a mutable cell.

Name: tes !.CzKQna1OU!+59SbFBssi+M3ze 2013-01-12 10:39

test, spam me if you like

Name: test !7Q.NlmUoQE!a7Six4EVOK+5ROE 2013-01-12 10:41

bah

Name: testi !.CzKQna1OU!rcLUYFQ2lh0BTtk 2013-01-12 10:42

last one, i dare.

Name: Anonymous 2013-01-12 12:31

>>40
Cunter

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-13 6:36

>>63
Commodore > Atari

>>56
Every little bit counts.

Name: Anonymous 2013-01-13 7:04

Every little dubs counts

Name: Anonymous 2013-05-20 18:34


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