This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_ extPart_001_01C120D4.7A5D3950
Content-Type: text/plain;
charset so-8859-1"
How does one pass an array to a function where each element in the array is
taken as a argument to that function. If I use the code below, it ofcourse
complains that there are not enough arguments for the function b.
def b(x, y, z)
print "x {x}, y {y}, z {z}\n"
end
a 1,2,3]
b(a)
Is there a call like a.to_args to expand them out for the call?
Thanks,
Steve Tuckner
------_ extPart_001_01C120D4.7A5D3950
Content-Type: text/html;
charset so-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV
ontent-Type" CONTENT ext/html; charset o-8859-1">
<META content SHTML 5.00.2919.6307" name¥Û¥Ê¥á¥Á¥ä¥Þ¥á¥»¥·¥Ã¥Í¥Ê¥Á¥È¥»
¥·¥Ä¥Þ¥È¥ë¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û ¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥Í
¥ç¥ò¥µ ¥Î ¥Î ¥ã
¥ç¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û
¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥ò¥µ¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û ¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥» ¥£¥ã ¥ã
¥¥¥·¥Ä¥á¥»¥ò¥µ¥ò¥µ¥ò¥µ ¡Ö ¥ã ¥ã ¥ï¡Ö¥·¥Ä¥á¥»¥·¥Ä¥á¥»¥·¥Ë¥Þ¥Û¥ä
¨Â ¥·¥â¥ß¥Á¥Û ¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥» ¥í¥¢¥ã¥¤¥ã¥¦¥ó¥·¥Ä¥á¥»¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥£¥¥¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û
¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥ò¥µ¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û ¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥Î
¥ç¡¬ ¥½¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û
¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥ò¥µ¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û
¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥ä¥ã¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û
¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥ò¥µ¥·¥Ã¥È¥Î¥è¥»
¥·¥È¥Î¥è¥»¥·¥Ë¥Þ¥Û¥ä ¨Â ¥·¥â¥ß¥Á¥Û ¥¤¥ª¥¢¥ª¥¢¥¦¥å¡¼¥±¡¼¥¯¥¤¡¼¡¼¥¢¥»¥â
¥ä¥·¥Ã¥â¥ß¥Á¥Û¥»¥·¥Ã¥Ë¥Þ¥Û¥ä¥»¥·¥Ã¥È¥Î¥è¥»¥·¥Ã¥Ä¥Þ¥È¥ë¥»¥·¥Ã¥Í¥ä¥Ø¥Õ¥»
¥å¥å¥å¥å¥å¥å¡¬ ¥ß¡¬¡¼¡¼¥¢¡¬¡¼¥¢¥Æ¥¢¥¤¡¼¥È¥¨¥ç¥¥Á¥ª¥È¥¦¥±¥ª¡¼¥å¥å