[Swift-user] compile error

J A jamalphd at gmail.com
Thu Jan 28 10:11:36 CST 2010


Hi:

When I try to run the following code:

array_iteration.swift:


type file {}
(file f) echo (string s) {
    app {
        echo s stdout=@filename(f);
    }
}
(file fa[]) echo_batch (string sa[]) {
    foreach string s, i in sa {
        fa[i] = echo(s);
    }
}
string sa[] = ["hello","hi there","how are you"];
file fa[];
fa = echo_batch(sa);

......

I get the following error:

            Could not compile SwiftScript source: line 10:13: expecting an
identifier, found 'string'

any idea on how to fix it?


Thanks,
Jamal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20100128/95f17259/attachment.html>


More information about the Swift-user mailing list