#!/usr/bin/lua -- Tables: a={3} b=a; -- a and b point to the same table: print(a,b) -- table: 0x80509e0 table: 0x80509e0 print(a[1],b[1]) -- 3 3 a[1]=4; print(a[1],b[1]) -- 4 4 b[1]=5 print(a[1],b[1]) -- 5 5 a={6} -- a points to a new table and b still points to the old table: print(a,b) -- table: 0x8050a30 table: 0x80509e0 print(a[1],b[1]) -- 6 5 b[1]=7 print(a[1],b[1]) -- 6 7