On 3/2/13 4:48 PM, Renato Lenzi wrote:
Hi there.
How can i cast from int to float?
that is:
let x = 3
let mut f = 3.0
f = f * x
this doesn't work... i have to change from int to float... is this possible?
Use `as`; e.g. `f = f * (x as float)`.
Patrick
Hi there.
How can i cast from int to float?
that is:
let x = 3
let mut f = 3.0
f = f * x
this doesn't work... i have to change from int to float... is this possible?
Thx in advance.
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org
On 03/02/2013 07:39 AM, David Siefert wrote:
Wow--thanks for everyone responding so quickly and helping out!
This solves my problem--how can I update the documentation for at
least version 0.5?
The documentation is in the markdown files in doc/, and the docs on the
website are automatically
On Sat, Mar 2, 2013 at 2:20 PM, Ashish Myles wrote:
> On Sat, Mar 2, 2013 at 1:41 PM, Paul Stansifer
> wrote:
>>
>> `concat_idents!` is currently broken, and it's my fault. Here's a
>> discussion of how it might be fixed in the future:
>> https://mail.mozilla.org/pipermail/rust-dev/2013-February
On Sat, Mar 2, 2013 at 1:41 PM, Paul Stansifer wrote:
>
> `concat_idents!` is currently broken, and it's my fault. Here's a
> discussion of how it might be fixed in the future:
> https://mail.mozilla.org/pipermail/rust-dev/2013-February/003170.html Sadly,
> there is no workaround. Perhaps it shoul
`concat_idents!` is currently broken, and it's my fault. Here's a
discussion of how it might be fixed in the future:
https://mail.mozilla.org/pipermail/rust-dev/2013-February/003170.htmlSadly,
there is no workaround. Perhaps it should be removed so that it
stops confusing people?
Paul
So far, I have had a difficult time finding anything definitive on this
except for some rust test code.
fn main() {
// PART 1: works (from rust test code)
let asdf_fdsa = ~"<.<";
io::println(concat_idents!(asd, f_f, dsa));
io::println(stringify!(use_mention_distinction));
// P
Wow--thanks for everyone responding so quickly and helping out!
This solves my problem--how can I update the documentation for at least
version 0.5?
Thanks,
David
On Sat, Mar 2, 2013 at 6:46 AM, Niko Matsakis wrote:
> You need to include "extern mod std;" at the top of your program. This
> wi
You need to include
"extern mod std;" at the top of your program. This will link in the
standard library (as opposed to the core lib). I think that in modern
versions of the compiler (i.e., the trunk) this is automatic, or at
least has a better error message, but I am not sure.
Niko