[Swift-user] Variable Declaration

Jay Lee jlee734 at gmail.com
Sat Mar 9 17:48:17 CST 2013


Hello,

I just started with swift today, so excuse my lack of knowledge. I have the
following code:

type messagefile;
type string;

app (messagefile t) parse(messagefile n) {
   string v =  @regexp("abcdefghi", "c(def)g","monkey");
   echo @extractint(n) stdout=@filename(t);
}

app (messagefile t) greeting() {
echo "Hello, world!" stdout=@filename(t);
}

messagefile outfile <"hello.txt">;
messagefile input <"compile.txt">;

outfile = parse(input);



I get an error: Could not compile SwiftScript source: line 6:10: expecting
a semicolon, found '='

I found that there are mappers that can be used to declare variables
(namely files), but are these required?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20130309/3f8712c6/attachment.html>


More information about the Swift-user mailing list