<div dir="ltr"><div>Yes 2D arrays are supported with the same declaration syntax as Swift/K. You're trying to declare a 2D array with key types i and j in each loop iteration. The compiler is correctly pointing out that i isn't a type. You need to declare it outside of the loops then assign it inside the loops.<br>
<br></div>- Tim<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:44 PM, Ketan Maheshwari <span dir="ltr"><<a href="mailto:ketan@mcs.anl.gov" target="_blank">ketan@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are 2D arrays of this style supported in T:<div><br></div><div><div>main {</div><div>foreach i in [0:31]{</div>
<div> /*string commands[] = ["head","tail","wc","stat"];*/</div>
<div> foreach j in [0:24]{</div><div> string pyline=sprintf("import cPickle as pickle\n\nrepr(pickle.dumps({'foo1':%s,'foo2':%s}))", i, j);</div><div> string pickle[i][j] = python(pyline);</div>
<div> }</div><div>}</div><div>}</div></div><div><br></div><div>stc gives following error:</div><div><br></div><div><div>stc error:</div><div>multi-map-reduce.swift:15:3: The following type was not defined in the current context: j</div>
</div></div>
<br>_______________________________________________<br>
ExM-user mailing list<br>
<a href="mailto:ExM-user@lists.mcs.anl.gov">ExM-user@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a><br>
<br></blockquote></div><br></div>