[Swift-devel] readData from file array

Ketan Maheshwari ketancmaheshwari at gmail.com
Wed Apr 3 21:06:43 CDT 2013


Hi,

Trying to use the readData method on array of files into variables seems to
be failing. Following is an example reproducing the failure:

$ cat test2.swift
type file;

app (file _out) genrand(){
    rand stdout=@_out;
}

file out[]<simple_mapper; location="outdir", prefix="o", suffix=".out" > ;
int val[];

foreach i in [0:9]{
    out[i]=genrand();
    val[i]=readData(out[i]);
}

App rand is mapped to a simple random number generator:

$ cat rand.sh
#!/bin/bash

echo $RANDOM


The error message I get on running this is:

Could not start execution
Failed to convert .swiftx to .kml for test2.swift
no such attribute: partialClose in template context [callInternal]

I tested readData on scalars which is working ok. Also, if I remove the
readData line, the script behaves ok.

Thanks,
-- 
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20130403/b907e1da/attachment.html>


More information about the Swift-devel mailing list