====== LOLCODE recommendation 1.0 ======
===== DRAFT =====
==== 22 June 2007 ====
//This is an edit of recommendation [[spec:1.0]] to reflect what is and isn't seen as being viable in the long-term for the language.//
- Statements are separated by [\n.]+ **//[\n,]+//**
- CAN HAS ?
- for inclusion/requirement
- GIMMEH [(LINE|WORD|LETTAR)] [OUTTA ]
- with default being LINE and STDIN
- HAI
- KTHXBYE
- only closes HAI and exits with good condition
- DIAF [ []]
- Exits the program (failure)
- Status code:
- Printed to stderr or equivalent:
- BYES [ []] **//???//**
- KTHX
- is the universal "closing bracket" line
- for any if block, looping block, function, etc... except HAI
- IM IN YR []
- label has no effect
- VISIBLE [!]
- prints stuff as minimally as possible and with a newline (unless !)
- I HAS A [ITZ ...]
- Everything is an array. muahahahaha.
- To clarify, every VARIABLE is an array, and it knows its own dimensions.
- By default, the variable has one element
- ITZ ... has been tabled for future usage
- [## IN MAH]*
- Since all variables are arrays, with no IN MAH it references the array as a whole.
- Multiple occurences of this index sub-levels of the array.
- 1 IN MAH 2 IN MAH arr <=> arr[2][1]
- IN MAH clarifies the dimension of the array itself, it is not meant to "return" a smaller array. So, 0 IN MAH 0 IN MAH VAR must only be used in a two-dimensional array, just like **arr should only be used in a 2-D array in C.
- Does NOT expand the size of the array (except as l_value of assignment)
- Throws error/dies on out of bounds?
- LOL R
- Assigns value into l_value specified by var.
- Extends the size of var if necessary
- If no index is specified, applies to all elements? (one by default)
- IZ [?] [(.|\n) YARLY] (.|\n) (.|\n) [NOWAI (.|\n) ] KTHX
- Conditional syntax. See examples. **//to be revisited?//**
- Comparison operators: [NOT] ((BIGR|SMALR) THAN|LIEK)
- See example and keywords:operators
- Logical/Bitwise operators: (NOT|AND|OR|XOR)
- See example and keywords:operators
- Operators (all math, as of v1.0, is integer math)
- a UP b : a +
- UPZ a!![b : a += b (b=1)
- a NERF b : a - b
- NERFZ a!![b] : a -= b (b=1)
- a TIEMZ b : a * b
- TIEMZD a!![b] : a *= b (b=1)
- a OVAR b : a / b
- OVARZ a!![b] : a /= b (b=1) **//currently being revisited//**