[Swift-user] app argument int passed as float

Ketan Maheshwari ketancmaheshwari at gmail.com
Wed Oct 19 20:30:24 CDT 2011


Hi,

In my app definition, I have an argument of type int that is expected by the
executable.

I define my app something like this:

(outfile o ) app myapp(string a, int b, datafile c, ...){
 cmd a b c stdout @o;
}

I call this as:
<..mappers..>

out = myapp("foo", 35, @afile, ...);

However, it seems that at the time of the actual call, the value 35 which is
an int get replaced by the value 35.0, a float.

I could see this from the arguments dumped by swift at the end of exception
message:

"
Exception in presgt:
Arguments: [TEST, 35.0, .....
"

The underlying app binary doesn't like because apparently the java is
calling Integer.parseInt and getting a float formatted string.

Any ideas?

Regards,
-- 
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20111019/6563688f/attachment.html>


More information about the Swift-user mailing list