[Swift-devel] Re: [Swift-user] swift syntax problem (please ignore the previous one )
    Ben Clifford 
    benc at hawaga.org.uk
       
    Fri May 29 18:41:58 CDT 2009
    
    
  
You can use some code like the below. This uses the simple mapper to 
generate a new filename for otherfile, based on substituting "foo" for 
"hello".
type messagefile;
app (messagefile t) greeting() { 
    echo "Hello, world!" stdout=@filename(t);
}
messagefile outfile <"/tmp/hello.txt">;
messagefile otherfile 
<single_file_mapper;file="/"+ at regexp(@filename(outfile),"hello","foo")>;
otherfile = greeting();
    
    
More information about the Swift-devel
mailing list