Advertisement
hevohevo

the table is a hash

Mar 28th, 2016
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. local isonoke = {boy="Katsuo", girl="Wakame", baby="Ikura"}  -- 連想配列の作成
  2. print(isonoke["boy"], "doesn't get old at all.")    -- "boy"をキーに値"Katsuo"を呼び出す
  3. isonoke["boy"] = "Tara"    -- -- "boy"をキーに値を書き換え
  4. print(isonoke["boy"], "is an eternal boy!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement