[Swift-user] optional arguments of different types
Max Hutchinson
maxhutch at gmail.com
Fri Jul 17 11:23:23 CDT 2015
Hello,
I've defined a function with two optional arguments, one int and one string:
(int retcode) sweep (string prefix, file json, file tusr,
string pname, float[] pvals, int nwrite, boolean
legacy,
int nstep,
int io_step, int step_block,
float io_time, float time_block,
int nodes, int mode, int job_time,
string analysis="RTI",
int j0=0
){
When I run, I get a warning that seems to indicate that the second optional
argument is being given the string type even though its declared int:
Could not start execution:
k:main @ HillColl.kml, line: 1 does not have a parameter named
'swift.string.17023j0', k:named @ HillColl.kml, line: 850:
k:main @ HillColl.kml, line: 1 does not have a parameter named
'swift.string.17023j0'
If I change the order the optional arguments are declared in, then it
thinks the string argument is an int:
Could not start execution:
k:main @ HillColl.kml, line: 1 does not have a parameter named
'swift.int.0analysis', k:named @ HillColl.kml, line: 850:
k:main @ HillColl.kml, line: 1 does not have a parameter named
'swift.int.0analysis'
Is there heavy use of optional arguments in the community?
Thanks,
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20150717/7ab6c408/attachment.html>
More information about the Swift-user
mailing list