2017-12-26 5 views

答えて

3

1 one 
2 two 

を取得する必要があります

-- define the function 
function foo() 
    return "one", "two" 
end 
-- set z to a table of the return values of foo(). The first return 
-- value will be z[1], the second one z[2], and so on. 
z = {foo()} 
-- print it out 
for k,v in pairs(z) do 
    print(k, v) 
end 

は事の並べ替えは、あなたが探しているということですか?

+0

私は 'ペア 'が何をするのか分からないが、私はする必要はない。私は 'z'を違うように扱います。これは機能します。ありがとうございました。 – GreenHawk1220

+0

大歓迎です。そして、あなたはすぐにペアを愛するつもりです(それはとても便利です)。 –

関連する問題