Template repo for tiny cross-platform apps that can be modified on phone, tablet or computer.
1{
2 {type='rows', default={font={size=21}, line_height=35},
3 {type='text', font={size=28}, line_height=50,
4 {'Lua@{Lua} > トップレベル',
5 attrs={
6 Lua={target='--lua'},
7 }},
8 },
9 {type='filler', height=15},
10 {type='text', 'すべてのLuaプログラムはいくつかの種類のもので構成されています。'},
11 {type='filler', height=15},
12 {type='text', 'x = 34', font={size=24}},
13 {type='text', ' 変数定義'},
14 {type='filler', height=10},
15 {type='text', 'function add(a, b) return a+b end', font={size=24}},
16 {type='text', ' 関数定義'},
17 {type='text', " ('end'の前に複数の文を含むことができます。変数定義を含む。)"},
18 {type='filler', height=10},
19 {type='text', 'x = add(3, 4)', font={size=24}},
20 {type='text', ' 変数定義は(上記/前に定義された)関数を呼び出すことができます'},
21 {type='filler', height=10},
22 {type='text', 'add = function(a, b) return a+b end', font={size=24}},
23 {type='text', ' 上記の関数を定義する別の方法。関数名は変数名の一種です。'},
24 }
25}