LUA Table/Array Maker - Save Time and Brain Cells

Download: http://jbafiles.com/free/lua-table-maker.zip

Purpose:
This program's intent is to facilitate the creation of LUA tables/arrays by removing the need to specify an integer value on each entry. Furthermore, this also facilitates updating the table by not having to adjust each entry's integer value.

In a way it reminds me of enumeration in C++ and C#.

How it Works.
Each line has a purpose.  The first line is a "separator" that will be used to surround the table.  The second line is the table/array name.  The third line is the initial integer value, which will be assigned to the first table entry.  The fourth and subsequent entries are the names of the table entries.  Multiple tables within a single file are supported, just ensure to press the Enter key twice.

Sample Input:
----------------------
animations
1
idle
walk
run

factions
0
neutral
good
bad

Sample Output:
-- ANIMATIONS
----------------------
animations = {}
animations.idle = 1
animations.walk = 2
animations.run = 3
----------------------

-- FACTIONS
----------------------
factions = {}
factions.neutral = 0
factions.good = 1
factions.bad = 2
----------------------


Program Image


Coded with the wonderful BlitzMax.

Published: Aug 18, 2014

1 comment:

  1. I stumbled upon this in YouTube searches. Thanks for your hard work!

    ReplyDelete

Sign up for the JBA Newsletter. A few times per year I may sell or give away gadgets and other electronics By signing up you ensure getting notified in a timely manner. I do NOT send you emails that will waste your time. Thank you.

Home

Hi. My name is Jesse, and I'm a technology enthusiast. I play with technology and share what I find on this blog. If you have any questions then please use the contact form below. I'll get back to you as soon as I can.


Contact

Name

Email *

Message *