<div>That solved the issue Michael.</div>
<div> </div>
<div>Thanks<br><br></div>
<div class="gmail_quote">On Thu, Jan 28, 2010 at 11:29 AM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">One thing I spot here is that this statement:<br>
<div class="im"><br> foreach string s, i in sa<br><br></div>should be written:<br><br> foreach s, i in sa<br><br>The foreach statement does not permit you to re-declare the types of the iteration variables (s and i in your case).<br>
<br>- Mike<br>
<div>
<div></div>
<div class="h5"><br><br>----- Original Message -----<br>From: "J A" <<a href="mailto:jamalphd@gmail.com">jamalphd@gmail.com</a>><br>To: <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
Sent: Thursday, January 28, 2010 10:11:36 AM GMT -06:00 US/Canada Central<br>Subject: [Swift-user] compile error<br><br><br><br>Hi:<br><br>When I try to run the following code:<br><br>array_iteration.swift:<br><br><br>type file {}<br>
(file f) echo (string s) {<br>app {<br>echo s stdout=@filename(f );<br>}<br>}<br>(file fa[]) echo_batch (string sa[]) {<br>foreach string s, i in sa {<br>fa[i] = echo(s);<br>}<br>}<br>string sa[] = ["hello","hi there","how are you"];<br>
file fa[];<br>fa = echo_batch(sa);<br><br>......<br><br>I get the following error:<br><br>Could not compile SwiftScript source: line 10:13: expecting an identifier, found 'string'<br><br><br>any idea on how to fix it?<br>
<br><br>Thanks,<br>Jamal<br><br><br></div></div>_______________________________________________<br>Swift-user mailing list<br><a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br><a href="http://mail.ci.uchicago.edu/mailman/listinfo/swift-user" target="_blank">http://mail.ci.uchicago.edu/mailman/listinfo/swift-user</a><br>
</blockquote></div><br>