[Swift-user] assigning file variables
Michael Wilde
wilde at mcs.anl.gov
Wed Feb 25 08:17:45 CST 2009
I was surprised that while I can assign complete arrays from one var to
another, I can not assign values of type "file".
This script:
---
type file;
app (file out) echo (string s) { echo s stdout=@out; }
file result;
file f <"echo.out">;
f = echo("output");
result = f;
---
gives:
---
Swift svn swift-r2552 cog-r2303
RunID: 20090225-0810-sz60al30
Progress:
Execution failed:
java.lang.RuntimeException: Deep non-array structure copying
not implemented, when trying to copy
org.griphyn.vdl.mapping.RootDataNode identifier
tag:benc at ci.uchicago.edu,2008:swift:dataset:20090225-0810-tibqd6aa:720000000003
type file with no value at dataset=f (closed)
---
The reason I'd like to do such assignments (in my current script) is to
use a single_file_mapper inside iterate and foreach loops to map a file
to a specific name pattern (eg one not obtainable with anything but an
ext mapper) and then assign the file object to an array element for
further processing later in the script.
Is it likely that the above restriction on file assignment will be
lifted in a future release, or should users code as if files can not be
assigned?
Related question: I see that assignment of entire arrays works, which is
very useful. The messsage above implies that limited kinds of
"structure" assignments work, and others dont. Whats works currently,
whats planned, and whats not likely to be implemented?
More information about the Swift-user
mailing list