LOLCODE programs are stored in files that have the file extension .lol. Each file is set up with at least two lines:
HAI 1.2 KTHXBYE
- The first line contains
HAIand a version number.
- The last line contains the word
For example, in the above code snippet, we’re using version 1.2 of LOLCODE.
These two lines are required as the start and end of every LOLCODE program. Any code we write will go in between these two lines.
Note: All LOLCODE keywords are written in uppercase.
HAI is treated as cat slang for “hi.”
KTHXBYE is short for “ok thanks bye.”
In the index.lol file, type in the two required lines of LOLCODE.
In the bash terminal, type the following command after the
$ sign and press enter:
lci is the LOLCODE intepreter and the
index.lol is the file name.
This program doesn’t do anything yet. In the next exercise, we’ll put some more content into the file and have it output things.