Upload
Login or register
Refresh Comments
Anonymous comments allowed.
asd
#11 - jokeface
Reply 0
(07/01/2013) [-]
I haven't had a programming lesson since 2007, but I think the person who posted the programming joke messed it up. Don't "if-then" statements only work if you include the word "then" after the conditional clause?
#16 to #11 - Korosia
Reply 0
(07/01/2013) [-]
Only in some languages, like python and basic. Most languages wouldn't. Ie,

IF InStock(eggs) THEN buy(eggs);

versus

if(InStock(eggs)) {
buy(eggs);
}

The joke still doesn't really make sense, because there's no way a programmer would interpret that to mean he should keep looping his instructions until he buys eggs, which is what the joke implies. You would need to add some kind of while(!eggs) loop in to get the behaviour described in the joke, and I don't see why anyone would do that...
#21 to #16 - Mumford
Reply 0
(07/01/2013) [-]
Nope i think you've got it wrong. It's not meant to be a loop it's morely an addition. The programmer is to buy a loaf of bread. The condition is that if theres eggs which there usually is in stores he's to buy a dozen. However in a program it'd read it as.

IF InStock(eggs)
{
buy (dozen) loafs;
}
#12 to #11 - rdobet
Reply 0
(07/01/2013) [-]
It's implied. I agree with you, but it's still hilarious.