% LightScript Documentation % Rasmus Jensen @ lightscript.net % 2010
LightScript is a scripting language for rapid application development for mobile phones.
- Documentation is available from lightscript.net in online and printable form.
- Latest source code can be downloaded from github.com/rasmusjensen/lightscript
- Updates on recent commits on twitter.com/lightscript
Features include:
- Runs on very low end mobile phone, requires only CLDC/1.0
- JavaScript/EcmaScript-like semantics and syntax
- Closures and first class functions
- Objects with prototypical inheritance
- Small size ( < 30KB code footprint) and fast execution
- Exceptions, object literals
- Good integration with Java
(to be more in concordance with standard soon. Non-EcmaScript-functions may change api before in next version)
- Object.create
- print(text)
- clone(Object)
- parseint(string, base)
- global
- .__getter__(key)
- .__setter__(key, val)
- All types
- .toString()
-
- java.util.Stack type
- [elem1, elem2, ...]
- Array()
- .__getter__(key)
- .__setter__(key, val)
- .__iter__()
- .push(val)
- .pop()
- .join([seperator])
- .slice(start[, end])
- .concat(...)
- Array.concat(...)
- .sort([compare function])
- .toTuple()
- java.util.Hashtable type
- { key: val, key:val, ... }
- Object()
- .hasOwnProperty(x)
- .__getter__(key)
- .__setter__(key, val)
- .__iterator__
- java.lang.String type
- "..."
- '...'
- String()
- .__getter__(key)
- .toInt()
- .slice(start[, end])
- .charCodeAt(pos)
- .concat
- String.fromCharCode(code)
- java.lang.Object[] type
- Tuple(...)
- .sort([compare function[, start[, end]]])
- .toArray()
- java.lang.Integer type
- 123...
- .toInt()
- Menu()
- .addItem(text[, callback])
- .show()
- TextBox(prompt[, default text], callback)
- Storage.set(key, value)
- Storage.get(key)
