It is can be LOLCODE time plz?:
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?
I can has syntax?
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.
LOLCODE I HAS IT You begin each LOLCODE application with the HAI statement. Next, use the LOLCODE print statement, VISIBLE, and finish your application with KTHXBYE:
VISIBLE "HAI WORLD!"
You'll notice, of course, that everything in LOLCODE is in all caps.
I'm in ur loop, iterating ur variable
To declare a variable in LOLCODE, use the I HAS A statement, like so:
I HAS A CHEEZBURGER
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:
I HAS A CHEEZBURGER ITZ 1
IM IN YR LOOP
VISIBLE "I has dis many: " N CHEEZBURGER
IZ CHEEZBURGER BIGGER THAN 11 O RLY?
The I HAS A statement declares the variable CHEEZBURGER as 1. The IM IN YR LOOP statement starts the loop.
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.