A pack() function?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: A pack() function?
- From: Majic <majic.one@...>
- Date: 2010年1月17日 02:29:59 -0800
Hello, I've been trying to figure out the best way, or if there's a
shorthand way, to build a table from whatever is returned by a
function. I was thinking something along the lines of local newtable
= pack(somefunc()) I know pack() doesn't exist, but I can't seem to
get anything similar if I were to do local newtable{} = somefunc()? I
vaguely remember someone doing something like this, I just don't know
the syntax, or I'm imagining things again... Anyway, I thought it was
very strange that a pack() doesn't exist and in another message on
here I suggested that unpack() be moved to table.unpack() anyway
(sort of wish this and that posting were together now...) I just
thought it'd be useful...
Ideas?