From 314b7e319c1392841b07a0800ed76c48d36c74db Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 3 Oct 2008 10:50:19 -0700 Subject: Adding the dtable function. --- lib/supportlib.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/supportlib.lua b/lib/supportlib.lua index a8e2f93..7c7905c 100644 --- a/lib/supportlib.lua +++ b/lib/supportlib.lua @@ -209,3 +209,19 @@ end function trim(str) return ltrim(rtrim(str)) end + + +-- +-- Displays a table on screen. +-- + +function dtable(x, y) + local b = Buffer() + if y then + dumpvars(b, x, y) + else + dumpvars(b, x) + end + display(b) + b:close() +end -- cgit v1.2.3