Skip to content

Latest commit

 

History

History
124 lines (82 loc) · 2.5 KB

File metadata and controls

124 lines (82 loc) · 2.5 KB

LolCode Documentation

LolCode source code
LolCode README

Features


##Code Evaluation##

##Stdout Printing## ###VISIBLE keyword###

VISIBLE ("Hello World!")  
VISIBLE (3)

##Stderr Printing## ###COMPLAIN keyword###

COMPLAIN ("Hello World!")

##LolCode Comments## ###BTW keyword###

BTW ("Hello World!")

##LolCode Math## Note: Math does not follow order of operations, use gratuitous parentheses if in doubt. ###Addition###

1 UP 2		// Equals 3

###Subtraction###

1 NERF 2	// Equals -1

###Multiplication###

1 TIEMZ 2	// Equals 2

###Division###

1 OVAR 2	// Equals 0
1.0 OVAR 2	// Equals 0.5

###Modular Arithmetic###

1 MOD 2		// 

###Max/Min###

BIGR_OF(1, 2)		// Equals 2
SMALLR_OF(1, 2)		// Equals 1

##Boolean operators## ###Inequality##

1 BIGR_THAN 2		// Evaluates to false
1 SMALLR_THAN 2		// Evaluates to true

###Equality###

1 LIEK 2			// Evaluates to false

##Variables## ###Variable Syntax### A variable is a Scala symbol (ex. 'a: Symbol)
Declaration (I_HAZ_A and LOL) and assignment (ITZ and R) are done using the syntax:

I_HAZ_A ('a) ITZ 17
LOL ('str) R "Hello World!"

###Math with variables### Math using variables proceeds similarly to other programming languages. Insert the variable name where a number should appear, and evaluation will take place as normal.

I_HAZ_A ('x) ITZ 17
I_HAZ_A ('y) ITZ 9
I_HAZ_A ('z) ITZ ('x NERF 'y)

##Conditional Branching## ###If Syntax###

##Loops## ###Loop Syntax###

##User Input## ###Input Syntax###