Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

LOLCODE Loops

HAI 1.2
I HAS A VAR ITZ 0
IM IN YR LOOPY UPPIN YR VAR TIL BOTH SAEM VAR AN 10
   VISIBLE SUM OF VAR AN 1
IM OUTTA YR LOOPY
KTHXBYE

LOLCODE BUKKIT

HAI 1.2
   I HAS A VAR6 ITZ A BUKKIT
   BTW DECLARING AN ARRAY
   VAR6 HAS A VAR7 ITZ "DOGE"
   BTW VAR7 IS A STRING VARIABLE THAT IS INSERTED  INTO ARRAY VAR6
   VISIBLE VAR6'Z VAR7
   BTW GET THE ELEMENT OF ARRAY
KTHXBYE

LOLCODE Strings (YARN)

HAI 1.2
I HAS A VAR3 ITZ A YARN
VAR3 R "XYZ"
   VISIBLE VAR3
KTHXBYE

LOLCODE Numerical Types (NUMBR)

HAI 1.2
I HAS A VAR3 ITZ A NUMBR
   VISIBLE VAR3
KTHXBYE

LOLCODE Booleans (TROOFS)

HAI 1.2
I HAS A VAR3 ITZ A TROOF
VAR3 R "FAIL"
   VISIBLE VAR3
KTHXBYE

LOLCODE Untyped (NOOB)

HAI 1.2
I HAS A VAR3
VAR3 R "ANYVALUE"
VISIBLE VAR3
BTW Or declare in same line
I HAS A VAR4 ITZ 44
VISIBLE VAR4
KTHXBYE

LOLCODE Type Casting

HAI 1.2
I HAS A food ITZ "111.00033"
VISIBLE food
BTW this is how we do type casting
MAEK food A NUMBAR
VISIBLE food
KTHXBYE

LOLCODE Declaration and Assignment of Variables

HAI 1.2
BTW this is how we declare variables
I HAS A food
I HAS A bird
BTW this is how we assign variables
food R 1
bird R 5
BTW this is how initialize variables
I HAS A biz ITZ "OMG!"
VISIBLE food
VISIBLE biz
VISIBLE bird
KTHXBYE

LOLCODE Naming Conventions

HAI 1.2
I HAS A food ITZ "111.00033"
I HAS A food2 ITZ "111"
I HAS A fo_od ITZ "1"
VISIBLE food
VISIBLE food2
VISIBLE fo_od
KTHXBYE

LOLCODE File Creation

HAI 1.2
I HAS A NAME
VISIBLE "NAME::"!
GIMMEH NAME
VISIBLE "tutorialsPoint " NAME "!"
KTHXBYE

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.