[Swift-user] floor(), ceil() and round() issues with v0.8.0
Timothy Stitt (TGAC)
Timothy.Stitt at tgac.ac.uk
Sun Jul 26 14:59:57 CDT 2015
Dear Swift/T developers & users,
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:
stc error:
test.swift:7:6: Cannot assign to t: LVal has type int but RVal has type float
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:
import math;
import io;
import sys;
main
{
int t = floor(7.8);
trace(t);
}
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.
Thanks,
Tim.
---
Timothy Stitt PhD / Head of Scientific Computing
The Genome Analysis Centre (TGAC), Room 204b
http://www.tgac.ac.uk/
p: +44 1603 450378
e: timothy.stitt at tgac.ac.uk<mailto:timothy.stitt at tgac.ac.uk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20150726/0c1b5b29/attachment.html>
More information about the Swift-user
mailing list