|
|
|
|
|
|
|
|
|
chickuaua

Crustacean

|
|
 |
« #9 : 07-02-2003 07:37 »
|
|
In Mother's day, there are also some programming language jokes.. A sign says: REPEAT { LOVE MOM } WHILE 1>0; This is probably Pascal, because in C there is no repeat..while loop. This code would just make an infinite loop not doing anything, since { LOVE MOM } is a code comment. Also, another sign says: CHR$(77) => "MANY THINGS SHE GAVE ME" Although this doesn't make sense in any programming language, CHR$(77) means (in BASIC) ASCII character number 77, 'M' Jokes like this should all really just be funny and not logical  And, yes, I'm a programmer  10 SIN 20 GOTO HELL This isn't stupid, it's just funny  It's no conditional jump, so, from this code, you'd just sin and go to hell  10 HOME 20 SWEET 30 GOTO 10 This really should make an infinite loop, just look at recursive names like "PHP: PHP Hypertext Preprocessor" and "GNU: GNU's Not Unix"  B-)
|
|
|
|
|
|
SQFreak

Professor

|
|
 |
« #11 : 07-02-2003 12:56 »
« : 07-02-2003 12:56 »
|
|
REPEAT is probably Pascal, but if they had used do...while, that can be C(++). The infinite loop is part of the joke. Only CompSci people would get it, and if you get it, it is really funny. Wasn't there an infinite loop joke in "I Dated a Robot"? At a camp I went to, it's a tradition to make class T-shirts. The Artificial Intelligence class's t-shirt was: How to make an infinite loop: see other side on both sides of the shirt. If they'd had extras, I would have bought one. The real reason that BASIC is written 10 STATEMENT ONE 20 STATEMENT TWO 30 STATEMENT THREE
(in increments of ten) is so that a programmer can come back in later and add, say, a line 25 without having to redo all the numbers.
|
|
|
|
|
|
|
|
|
El Zilcho

Professor

|
|
 |
« #16 : 07-02-2003 15:56 »
« : 07-02-2003 15:56 »
|
|
Originally posted by canned eggs: Some people I know in a computational linguistics course wrote a program to identify ellipsis called VIEWIC. VIEWIC stands for: "VIEWIC Identifies Ellipsis When It Can." I always thought that was real clever. Sounds like a Dilbert joke. "What does TTP stand for?" " The TTP Project. " EDIT: Dammit, sorry for the double post. I was gonna paste this one into my first one.
|
|
|
|
|
|
|
|
PCC Fred

Space Pope
   
|
|
 |
« #20 : 07-04-2003 03:28 »
|
|
Originally posted by Chriswell: It's funny only if you're familiar with Basica programming.
Notice in I, Roomate the sign:
10 HOME 20 SWEET HOME 30 GOTO 10
Of ocurse it's flawed with that it'll make HOME SWEET HOME an infinite loop. Would've made more sense if it went:
10 HOME 20 SWEET HOME 30 GOTO 10 40 END
-cs
That wouldn't work either, because line 30 causes it to return to line 10, and the prgram never reaches line 40, and therefore never ends. However the following program WILL work. 10 FOR N = 1 TO 2 20 PRINT "HOME" 30 IF N = 1 THEN PRINT "SWEET" 40 NEXT N 50 END Now if you want to see a BASIC program with some chest hair on it, click on the following link: http://teral.netfirms.com/PEEL/fred/Ff12003.zip
|
|
|
|
|
|
|
|
|
|
|
|
chickuaua

Crustacean

|
|
 |
« #28 : 07-05-2003 13:05 »
|
|
or better yet ... void Home ( void ) { Sweet (); } void Sweet ( void ) { Home (); } 
|
|
|
|
|
|
|
|
Tjoppen
Delivery Boy
 
|
|
 |
« #32 : 07-05-2003 15:49 »
|
|
chickuaua: No compiler will accept that code(although I guess you knew that)  SQFreak: The void parameter is optional in the function prototype, however I would recommend not omitting them since it makes code oh so much more readable  Also, here's the code for a 23 byte ASM program that prints the HOME SWEET inf. loop: org 0x100 mov dx, string mov ah, 09h loop1: int 21h jmp loop1
string db "HOME",13,10,"SWEET",13,10,"$" What one could do with Yorokobi's program is this: 5 OPTION BASE 0 10 DIM MSG$(3) 20 LET MSG$(0)="HOME" 30 LET MSG$(1)="SWEET" 40 LET MSG$(2)=MSG$(0) 50 I = 0 60 PRINT MSG$(I) 70 I = (I + 1) MOD 3 80 GOTO 60 <Leela> Sigh.. I need coffee. </Leela>
|
|
|
|
|
|
|
|
|
|
|
|