<div dir="ltr"><div><div><div>Hi Tim,<br></div>  The return type of those functions changed to float in 0.8.0 as part of a bigger effort to standardise the Swift library.  We tried to keep things backwards compatible as much as possible but unfortunately there wasn't a way to do that in this case.<br></div><br>You can get the same effect with toInt(floor(7.8))<br><br></div>- Tim<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 July 2015 at 12:59, Timothy Stitt (TGAC) <span dir="ltr"><<a href="mailto:Timothy.Stitt@tgac.ac.uk" target="_blank">Timothy.Stitt@tgac.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
Dear Swift/T developers & users,</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<br>
</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
I've been recompiling a Swift/T script in v0.8.0 (which worked in previous versions) but its failing to compile at the line involving the floor() command. The error I'm seeing is:</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<br>
</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<div>stc error:</div>
<div>test.swift:7:6: Cannot assign to t: LVal has type int but RVal has type float</div>
</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<br>
</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
I know that this worked fine in previous versions so I tried to compile with the trivial example below and I get the same error:</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<br>
</div>
<div>
<div><font face="Candara,sans-serif" color="#183669">import math;</font></div>
<div><font face="Candara,sans-serif" color="#183669">import io;</font></div>
<div><font face="Candara,sans-serif" color="#183669">import sys;</font></div>
<div><font face="Candara,sans-serif" color="#183669"><br>
</font></div>
<div><font face="Candara,sans-serif" color="#183669">main</font></div>
<div><font face="Candara,sans-serif" color="#183669">{</font></div>
<div><font face="Candara,sans-serif" color="#183669"> int t = floor(7.8);</font></div>
<div><font face="Candara,sans-serif" color="#183669"> trace(t);</font></div>
<div><font face="Candara,sans-serif" color="#183669">}</font></div>
</div>
<div><font face="Candara,sans-serif" color="#183669"><br>
</font></div>
<div><font face="Candara,sans-serif" color="#183669">I substituted floor() for ceil() and round() and got the same error. Is there something wrong with the math library or am I doing something really stupid that I can't see.</font></div>
<div><font face="Candara,sans-serif" color="#183669"><br>
</font></div>
<div>Thanks,</div>
<div><br>
</div>
<div>Tim.</div>
<div style="color:rgb(24,54,105);font-family:Candara,sans-serif;font-size:14px">
<p style="font-size:12px;margin:0px;font-family:Verdana">---</p>
<p style="margin:0px;font-family:Verdana"><span style="font-size:10px"><b>Timothy Stitt PhD</b> / Head of Scientific Computing</span></p>
<p style="margin:0px;font-family:Verdana"><span style="font-size:10px">The Genome Analysis Centre (TGAC), Room 204b</span></p>
<p style="margin:0px;font-family:Verdana;color:rgb(4,46,238)"><span style="text-decoration:underline;font-size:10px"><a href="http://www.tgac.ac.uk/" target="_blank">http://www.tgac.ac.uk/</a></span></p>
<p style="margin:0px;font-family:Cambria;min-height:19px"><span style="font-size:10px"><br>
</span></p>
<p style="margin:0px;font-family:Verdana"><span style="font-size:10px">p: <a href="tel:%2B44%201603%20450378" value="+441603450378" target="_blank">+44 1603 450378</a></span></p>
<p style="margin:0px;font-family:Verdana;color:rgb(13,102,213)"><span style="color:rgb(0,0,0);font-size:10px">e: <a href="mailto:timothy.stitt@tgac.ac.uk" target="_blank">timothy.stitt@tgac.ac.uk</a></span></p>
</div>
</div>

<br>_______________________________________________<br>
Swift-user mailing list<br>
<a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br>
<a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" rel="noreferrer" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br></blockquote></div><br></div>