@VictorRajewski1/

Crash Course in LOLCODE

LOLCODE

No description

fork
loading
main.lol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 HAI 1.2

BTW This is a one-line comment
OBTW
  This is a
  multi-line
  comment
TLDR

I HAS A BOOLEAN ITZ WIN      BTW this is a TROOF - WIN or FAIL
I HAS A INT ITZ 42           BTW this is a NUMBR - whole numbers only
I HAS A FLOAT ITZ 3.14       BTW this is a NUMBAR - non-whole numbers work
I HAS A STRING ITZ "Fun"     BTW this is a YARN - it can hold text
I HAS A NOT_INT ITZ "199"    BTW this is a YARN but it has a number value
I HAS A NOT_BOOLEAN ITZ 1    BTW this is also a NUMBR
I HAS A NOT_STRING ITZ 3912  BTW this is a NUMBR.
I HAS A YES_STRING           BTW declaring an empty variable to be cast to
I HAS A VAR1 ITZ "Hi"
I HAS A VAR2 ITZ 1234
I HAS A VAR3 ITZ WIN
I HAS A VAR4 ITZ SMOOSH VAR1 AN VAR2 AN VAR3 MKAY

NOT_INT IS NOW A NUMBR         BTW this makes NOT_INT into an integer
NOT_BOOLEAN IS NOW A TROOF     BTW this makes NOT_BOOLEAN into a boolean
YES_STRING R MAEK NOT_STRING A YARN   BTW YES_STRING is a string now.

VISIBLE "Invisible"
VISIBLE INT
VISIBLE SUM OF NOT_INT AN 1 
VISIBLE NOT_BOOLEAN
VISIBLE SUM OF NOT_STRING AN 1
VISIBLE YES_STRING
VISIBLE VAR1
VISIBLE VAR2
VISIBLE VAR3
VISIBLE VAR4
VISIBLE BIGGR OF INT AN FLOAT
VISIBLE ""

VISIBLE "GIMMEH YARN::"
I HAS A INPUT
GIMMEH INPUT
VISIBLE SMOOSH "You said " AN INPUT MKAY
VISIBLE ""

I HAS A TROOF1
I HAS A TROOF2
VISIBLE "GIMMEH A TROOF (WIN OR FAIL)"
GIMMEH TROOF1
VISIBLE "GIMMEH ANOTHUR"
GIMMEH TROOF2

BOTH SAEM TROOF1 AN TROOF2, O RLY?
  YA RLY
    VISIBLE "SAEM"
  NO WAI
    VISIBLE "DIFFRINT"
OIC
VISIBLE ""

I HAS A NUMBR1
I HAS A NUMBR2
VISIBLE "GIMMEH A NUMBR BTWN 1 AN 3"
GIMMEH NUMBR1
VISIBLE "GIMMEH ANOTHUR"
GIMMEH NUMBR2

SUM OF NUMBR1 AN NUMBR2, WTF?
  OMG 2
    VISIBLE "EVEN TEW"
    GTFO
  OMG 3
    VISIBLE "ODD TREE"
    GTFO
  OMG 4
    VISIBLE "EVEN FOR"
    GTFO
  OMGWTF
    VISIBLE "FIV OR SIX"
OIC
VISIBLE ""

I HAS A ITERATOR ITZ 0
IM IN YR LOOP UPPIN YR ITERATOR TIL BOTH SAEM ITERATOR AN 9
	VISIBLE ITERATOR
IM OUTTA YR LOOP

KTHXBYE
LOLCODE v1.2 (lol-coffee) Copyright (c) 2011 Max Shawabkeh