is there a common type?

Christian Köstlin christian.koestlin at gmail.com
Thu May 17 07:28:56 PDT 2012


On 5/15/12 19:44 , H. S. Teoh wrote:
> On Tue, May 15, 2012 at 07:29:38PM +0200, Christian Köstlin wrote:
>> for [1, 2, 3] and iota(2, 10)?
> [...]
>
> What are you trying to accomplish?
>
>
> T
>
actually i just want to do some commandline parsing with default-values 
like this:
int main(string[] args) {
   auto h = [1, 2, 3];
   if (args.length > 1) {
     h = iota(1, args[1].to!(int));
   }
   do_something_with(h);
   return 0;
}


More information about the Digitalmars-d-learn mailing list