{ {type='rows', default={font={size=21}, line_height=35}, {type='text', font={size=28}, line_height=50, {'Lua@{Lua} > 式', attrs={ Lua={target='--lua'}, }}, }, {type='filler', height=15}, {type='text', {'文内で変数を使用(定義ではなく)できる場所なら、その代わりにem@{式}を使用できます。いくつかの例:', attrs={ em={font={italic=true}}}}}, {type='text', '5', font={size=24}}, {type='text', ' すべての値(数値、文字列、テーブルなど)は型です。'}, {type='filler', height=10}, {type='text', '5+3', font={size=24}}, {type='text', ' 二つの数値を加算(+)、減算(-)、乗算(*)、除算(/)、剰余(%)を計算できます。'}, {type='filler', height=10}, {type='text', '4+3*2', font={size=24}}, {type='text', ' 式は他の式を含むことができ、学校で学んだ優先順位の規則に従います。'}, {type='text', ' 乗算、除算、剰余は加算と減算より先に実行されます。'}, {type='filler', height=10}, {type='text', '(4+3) * 2'}, {type='text', ' ある式が別の式より先に計算されるようにするには、括弧()を使用します'}, {type='filler', height=10}, {type='text', 'x == y'}, {type='text', " 二つの式を比較して、等しい(==)、等しくない(~=)、大きい(>)、小さい(<)、以上(>=)、以下(<=)かを判定できます。"}, {type='text', " これらの式は'if'文やループの条件で便利です。"}, {type='filler', height=10}, {type='text', 'x == 3 and y > 4', font={size=24}}, {type='text', {' 比較はem@{ブール値}trueまたはfalseを返し、andやorを使って組み合わせることができます。', attrs={ em={font={italic=true}}}}}, {type='filler', height=10}, {type='text', 'not x == 3', font={size=24}}, {type='text', ' ブール値を反対に変えます。'}, {type='filler', height=10}, {type='text', 'nil or 3', font={size=24}}, {type='text', 'nilを除き、すべての非ブール値はand/orでtrueのように動作します。'}, {type='filler', height=10}, {type='text', '"hello ".."world"', font={size=24}}, {type='text', ' 文字列値は..を使って結合できます'}, {type='filler', height=10}, {type='text', 'add(2, 3)', font={size=24}}, {type='text', ' 関数呼び出しは文としても式としても動作できます。'}, } }