I know very little about the LOLCODE programming language. This document will go over all of my knowledge of the LOLCODE programming language.
This is how you make a Hello World program in LOLCODE:
HAI 1.2
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
Comments in LOLCODE are unique, no other language currently uses comments like LOLCODE does.
Single line comments in LOLCODE are written like so:
BTW This is a comment
The BTW
keyword is similar to the REM
keyword in Batchfile. They both are for comments.
Multi-line comments in LOLCODE are written like so:
OBTW
This is a multi-line
comment in LOLCODE
TLDR
Multi-line comments start with OBTW
and end with TLDR
break;
To this day, I am still not entirely sure what the break
keyword does, but most languages support it.
I am not sure if LOLCODE supports the break
keyword
/!\ This example has not been tested yet, and may not work
LOLCODE has version specific Shebang lines. Currently, I only know of 3 that exist.
A miscellaneous LOLCode shebang.
HAI
BTW This is a LOLCODE program
KTHXBYE
A version 1.0 LOLCODE Shebang.
HAI 1.0
BTW This is a LOLCODE 1.0 program
KTHXBYE
A version 1.2 LOLCODE Shebang.
HAI 1.2
BTW This is a LOLCODE 1.0 program
KTHXBYE
The end keyword is written as KTHXBYE
it is to go at the end of a loop, or at the end of a program.
HAI
BTW I am going to go now
KTHXBYE
LOLCODE supports error handling with the O NOES
keyword. Error handling can be done like so:
HAI 1.0
CAN HAS STDIO?
PLZ OPEN FILE "/dev/null/"
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERROR!"
KTHXBYE
LOLCODE supports standard input/output through the following keyword:
CAN HAS STDIO?
LOLCODE supports file I/O. To open a file, simply run this:
LOLCATS.txt
PLZ OPEN FILE "LOLCATS.TXT"?
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERROR!"
Defining variables in LOLCODE can be done like so:
I HAS A VAR
Defining a loop in LOLCODE 1.0
HAI 1.0
IM IN YR LOOP
UP VAR!!1
VISIBLE VAR
IZ VAR BIGGER THAN 10? KTHX
IM OUTTA YR LOOP
KTHXBYE
Defining a loop in LOLCODE 1.2
HAI 1.2
CAN HAS STDIO?
IM IN YR LOOP UPPIN YR VAR TIL BOTH SAEM VAR AN 10
VISIBLE SUM OF VAR AN 1
IM OUTTA YR LOOP
KTHXBYE
-
LOLCODE is a language by [Unknown]
-
LOLCODE is not a semicolon and curly bracket language
-
LOLCODE uses the
*.lol
and*.lols
file extensions -
LOLCODE is an esotoric programming language
-
Currently, as of 2022 Wednesday July 27th, 1 variant of LOLCODE is turing complete
-
LOLCODE is influenced by the Lolcat series of Internet memes
-
LOLCODE is not one of the top 50 programming languages (as of 2022)
-
LOLCode is one of the top 50 esotoric programming languages (as of 2022)
-
No other knowledge of the LOLCODE programming language
- LOLCODE is a fun language to write in. I would love to use it for serious purposes, but my usage will remain limited. Unfortunately, I cannot has supercomputer lolz.
File type: Markdown document (*.md *.mkd *.mdown *.markdown)
File version: 1 (2022, Wednesday, July 27th at 7:33 pm PST)
Line count (including blank lines and compiler line): 276
Click/tap here to expand/collapse the history for this file
Version 1 (2022, Wednesday, July 27th at 7:33 pm PST)
Changes:
- Started the file
- Added the
title
section
- Added the
Hello World in LOLCODE
section
- Added the
Comments in LOLCODE
section
- Added the
Single line comments
subsection
- Added the
Multi-line comments
subsection
- Added the
break keyword in LOLCODE
section
- Added the
Shebangs in LOLCODE
section
- Added the
Misc
subsection
- Added the
V1.0
subsection
- Added the
V1.2
subsection
- Added the
End keyword
section
- Added the
Error handling
section
- Added the
Standard I/O
section
- Added the
opening files
section
- Added the
Defining a variable
section
- Added the
Defining a loop
section
- Added the
LOLCODE 1.0
subsection
- Added the
LOLCODE 1.2
subsection
- Added the
other knowledge of the LOLCODE programming language
section
- Added the
Additional comments
section
- Added the
file info
section
- Added the
file history
section
- No other changes in version 1