Code: Select all
rmn = string.sub(fhGetTag(ptrWork), 1, 1)
table.insert(tblRMN, rmn)
This is a slice of my matCEM function...It does a lot of stuff. Many times, one may only need a table or two out of its many tables.
so, I know I have seen tatewise do this when perusing his code and never understood it, and I cannot find it now when I need it, and cant find the example online.
rather than declare all these tables at the beginning of code before the functions as I have been doing, I would like to create them on the fly if they are not defined, I remember it looks something like:
table.insert(tblRMN, rmn) or {}
the questions are is that the correct statement, and on the first issuance of this, will rmn be inserted into the table or do I have to do some other check and insert it?