 local pu800 local function _main args local sepu800 mwu800u82emessageu82enewu800 'comma separator' plain return tableu82econcat args sepu800 endu800 function pu800u82emain frame local origargs ifu800 frame mwu800u82egetcurrentframe then weu800'reu800 being called viau800 #invoke. ifu800 theu800 invoking template passed anyu800 arguments useu800 them. otherwise useu800 theu800 arguments that were passed into theu800 template. origargs frame getparent .args foru800 ku800 vu800 inu800 pairs frameu82eargs dou800 origargs frameu82eargs break endu800 else weu800'reu800 being called from another module oru800 from theu800 debug console sou800 assume theu800 arguments areu800 passed inu800 directly. origargs frame endu800 useu800 integer args only andu800 allow foru800 explicit positional arguments that areu800 specified outu800 ofu800 order eu800u82egu800. bru800 separated entries 3u800 entry3 . after processing theu800 args canu800 beu800 accessed accurately from ipairs. local args foru800 ku800 vu800 inu800 pairs origargs dou800 ifu800 type ku800 'number' andu800 ku800 1u800 andu800 mathu82efloor ku800 ku800 andu800 mwu800u82eustringu82ematch vu800 ' su800' remove blank oru800 whitespace values. then tableu82einsert args ku800 endu800 endu800 tableu82esort args foru800 iu800 vu800 inu800 ipairs args dou800 args iu800 origargs vu800 trim whitespace from allu800 args. ifu800 type args iu800 'string' then args iu800 mwu800u82etextu82etrim args iu800 endu800 endu800 return _main args endu800 return pu800 