Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know that I agree, I really am not sure what "GIVING COBOL" means.


It's the assignment part; it says where the result should go. In this case, back to the "COBOL" variable. But, it's optional if you're assigning back to the source: ADD 1 TO COBOL means the same thing as ADD 1 TO COBOL GIVING COBOL. But, you can also do ADD 1 TO COBOL GIVING FOOBAR to assign it somewhere else.

(Yes, I just spent the last 10 minutes reading the COBOL pages on Wikipedia and Wikibooks.)


It's a COBOL joke. (And a bad one at that)

ADD 1 TO X GIVING Y is COBOL's way of saying y=x+1 ADD 1 TO COBOL GIVING COBOL is COBOL=COBOL+1. Or COBOL++ :)


Really? I've never coded in COBOL and it was pretty obvious straight away that it was an assignment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: