[ExM Users] unnamed array

Tim Armstrong tim.g.armstrong at gmail.com
Fri Apr 11 15:04:31 CDT 2014


I guess you found it, but  the [a, b, c] syntax is supported.  There's also
support for key-value literals as well.

-Tim


On Fri, Apr 11, 2014 at 1:52 PM, Ketan Maheshwari <ketan at mcs.anl.gov> wrote:

> Apparently yes:
>
> import io;
> (int v) thfribo_main(string A[]) "thfribo_main" "0.0" "thfribo_main_wrap";
>
> main {
>   int rc[];
>   foreach i in [4801:4900:1]{
>         rc[i] = thfribo_main([fromint(i)]);
>   printf("exit code: %i", rc[i]);
>  }
> }
>
> This works.
>
>
> On Fri, Apr 11, 2014 at 1:45 PM, Ketan Maheshwari <ketan at mcs.anl.gov>wrote:
>
>> Hi,
>>
>> In Swift/T, can I create an unnamed array to pass to a function. eg.
>>
>> retcode = afunc({"1"});
>>
>> Where function afunc takes an array as argument.
>>
>> Thanks,
>> Ketan
>>
>
>
> _______________________________________________
> ExM-user mailing list
> ExM-user at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/exm-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20140411/6ffe0d45/attachment.html>


More information about the ExM-user mailing list