From: Fred Werne Date: 2003-11-17T11:33:03+09:00 Subject: Re: array -> list Hi Wybo Wybo Dekker schrieb: > > Is there a way to convert an array to a (parameter-)list? Do you mean *anArray ? > I often find myself doing things like: > > year,mon,day,hour,minute = ParseDate.parse(datestring) > printf("%04d-%02d-%02d %02d:%02d\n",year,mon,day,hour,minute) > > while it would be a lot nicer to do: > > printf("%04d-%02d-%02d %02d:%02d\n", ParseDate.parse(datestring) I tested the following --------------------------------------------------- dateArray = [1973,11,9,11,30] printf("%04d-%02d-%02d %02d:%02d\n", *dateArray) --------------------------------------------------- It works. I don't have a class ParseDate with a method parse, but if it returns an Array, I think printf("%04d-%02d-%02d %02d:%02d\n", *ParseDate.parse(datestring)) ^ ^ will work. I hope, I understand your problem. Regards Fred from Wuppertal, Germany