Twistid
5,000+ posts
150.5
They're in ur Intarwebs, creating a programming language. The attack of the lolcats has spilled over to programming, with LOLCODE, a language based on the mangled grammar of lolcats. Pull up a buckit and I'll help wif ur understanding of LOLCODE.
Of course, like lolcats, LOLCODE has no practical or educational value, but that doesn't mean it isn't fun -- and how often do you have the opportunity to get in on the ground floor of the development of a programming language, anyway?
The LOLCODE language is still being developed, but you can start learning LOLCODE and even help shape its development. If you're a fan of lolcats, you'll find the syntax easy to remember. If you're not, you probably haven't read this far.
What introduction to a language would be complete without the ever-popular "Hello World!" example? LOLCODE provides a "HAI WORLD!" example instead.
You begin each LOLCODE application with the HAI statement. Next, use the LOLCODE print statement, VISIBLE, and finish your application with KTHXBYE:
Here, we're declaring CHEEZBURGER as a variable. Let's take a look at a short script that will iterate CHEEZBURGER and print out its value:
Next, we print out the current number using the VISIBLE function. You need to include N CHEEZBURGER rather than just CHEEZBURGER to print out the value of CHEEZBURGER. Then we do a comparison test, to see if the value is greater than the amount we want to trigger the end of the loop. UP CHEEZBURGER!!1 tells LOLCODE to add one to the value of CHEEZBURGER.
When we do the test, if it matches (YA RLY) LOLCODE will GTFO and exit the loop. If it doesn't (NO WAI) it will iterate the variable again. Note that the loop ends with KTHX rather than KTHXBYE, which is recommended only for closing the whole program block. Finally, we end the program block with KTHXBYE.
//content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh: //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh: //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh:
i wish i was still taking programming courses, my professors would get a real kick out of this //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif
Of course, like lolcats, LOLCODE has no practical or educational value, but that doesn't mean it isn't fun -- and how often do you have the opportunity to get in on the ground floor of the development of a programming language, anyway?
The LOLCODE language is still being developed, but you can start learning LOLCODE and even help shape its development. If you're a fan of lolcats, you'll find the syntax easy to remember. If you're not, you probably haven't read this far.
What introduction to a language would be complete without the ever-popular "Hello World!" example? LOLCODE provides a "HAI WORLD!" example instead.
You begin each LOLCODE application with the HAI statement. Next, use the LOLCODE print statement, VISIBLE, and finish your application with KTHXBYE:
Here, we're declaring CHEEZBURGER as a variable. Let's take a look at a short script that will iterate CHEEZBURGER and print out its value:
The I HAS A statement declares the variable CHEEZBURGER as 1. The IM IN YR LOOP statement starts the loop.HAII HAS A CHEEZBURGER ITZ 1
IM IN YR LOOP
VISIBLE "I has dis many: " N CHEEZBURGER
IZ CHEEZBURGER BIGGER THAN 11 O RLY?
YA RLY
GTFO
NO WAI
UP CHEEZBURGER!!1
KTHX
KTHX
KTHXBYE
Next, we print out the current number using the VISIBLE function. You need to include N CHEEZBURGER rather than just CHEEZBURGER to print out the value of CHEEZBURGER. Then we do a comparison test, to see if the value is greater than the amount we want to trigger the end of the loop. UP CHEEZBURGER!!1 tells LOLCODE to add one to the value of CHEEZBURGER.
When we do the test, if it matches (YA RLY) LOLCODE will GTFO and exit the loop. If it doesn't (NO WAI) it will iterate the variable again. Note that the loop ends with KTHX rather than KTHXBYE, which is recommended only for closing the whole program block. Finally, we end the program block with KTHXBYE.
//content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh: //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh: //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif :laugh:
i wish i was still taking programming courses, my professors would get a real kick out of this //content.invisioncic.com/y282845/emoticons/laugh.gif.48439b2acf2cfca21620f01e7f77d1e4.gif
