]>
Commit | Line | Data |
---|---|---|
223e47cc LB |
1 | // Copyright 2012 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | struct Pair { a: float, b: float } | |
12 | ||
13 | struct AnotherPair { x: (i64, i64), y: Pair } | |
14 | ||
15 | static x : (i32,i32) = (0xfeedf00dd,0xca11ab1e); | |
16 | static y : AnotherPair = AnotherPair{ x: (0xf0f0f0f0_f0f0f0f0, | |
17 | 0xabababab_abababab), | |
18 | y: Pair { a: 3.14159265358979323846, | |
19 | b: 2.7182818284590452354 }}; | |
20 | ||
21 | pub fn main() { | |
22 | let (p, _) = y.x; | |
23 | assert!(p == - 1085102592571150096); | |
24 | io::println(fmt!("0x%x", p as uint)); | |
25 | } |