Template repo for tiny cross-platform apps that can be modified on phone, tablet or computer.
at main 25 lines 1.1 kB view raw
1{ 2 {type='rows', default={font={size=21}, line_height=35}, 3 {type='text', font={size=28}, line_height=50, 4 {'Lua@{Lua} > top-level', 5 attrs={ 6 Lua={target='--lua'}, 7 }}, 8 }, 9 {type='filler', height=15}, 10 {type='text', 'All Lua programs are made of a few kinds of things.'}, 11 {type='filler', height=15}, 12 {type='text', 'x = 34', font={size=24}}, 13 {type='text', ' Variable definitions'}, 14 {type='filler', height=10}, 15 {type='text', 'function add(a, b) return a+b end', font={size=24}}, 16 {type='text', ' Function definitions'}, 17 {type='text', " (Can contain multiple statements before the 'end'. Including variable definitions.)"}, 18 {type='filler', height=10}, 19 {type='text', 'x = add(3, 4)', font={size=24}}, 20 {type='text', ' Variable definitions can call functions (defined above/earlier)'}, 21 {type='filler', height=10}, 22 {type='text', 'add = function(a, b) return a+b end', font={size=24}}, 23 {type='text', ' Just an alternative way to define the above function. A function name is just a kind of variable name.'}, 24 } 25}