- 履歴一覧
- 履歴 を表示
- luac.lua は削除されています。
- 1 (2014-08-18 (月) 05:06:04)
*全バージョン共通のluac [#nef30059]
**lua.exeがあれば、luac.exeは不要。 [#tf0df7ea]
以外と知られていないことですが、lua.exeがあれば、luac.exeは必要ありません。
*luac.lua [#u604e9d1]
- luac.luaとして保存
#sh(lua){{
-- compile the input file(s)
local chunk = {}
for _, file in ipairs(arg) do
chunk[#chunk + 1] = assert(loadfile(file))
end
if #chunk == 1 then
chunk = chunk[1]
else
-- combine multiple input files into a single chunk
for i, func in ipairs(chunk) do
chunk[i] = ("%sloadstring%q(...);"):format(
i==#chunk and "return " or " ",
string.dump(func))
end
chunk = assert(loadstring(table.concat(chunk)))
end
local out = assert(io.open("luac.lua.out", "wb"))
out:write(string.dump(chunk))
out:close()
}}
-Java, JavaScript, C言語, C++ 等、{}系の''c-style''の記述でプログラムしているので、それに近い戸惑わない文法が良いという人へ。
-Luaの既存のコード資産も使いたいので、''Lua本来の文法''も全て使えるものが良いという人へ。
**cp932 [#h67879a7]
- ''日本語 MS-Windows''なので、コンソール画面や他のアプリとの連携の都合上、''cp932(≒shift_jis)''の文字コードでLuaを利用したい人へ。
- プログラム側(C++の''マルチバイト'')がcp932なので、''文字コード変換をする必要がないLua''が欲しい人へ。
**compatible [#t44714ae]
- LUA_COMPAT_ALL でコンパイルされていますので、Lua5.2標準規格では使えなくなったLua5.1系の記述等も、その多くが利用可能です。
*仕様 [#s1af76f6]
-[[リファレンス>Lua c-style cp932_reference]]
*ライセンス [#sf76192a]
-[[MIT License>http://www.lua.org/license.html]]