2013-10-23 03:49:18 -05:00
|
|
|
#[feature(managed_boxes)];
|
|
|
|
|
2013-09-25 02:43:37 -05:00
|
|
|
pub fn main() {
|
2013-03-27 15:53:03 -05:00
|
|
|
let v: ~[int] = ~[ 1, ..5 ];
|
2014-01-09 04:06:55 -06:00
|
|
|
println!("{}", v[0]);
|
|
|
|
println!("{}", v[1]);
|
|
|
|
println!("{}", v[2]);
|
|
|
|
println!("{}", v[3]);
|
|
|
|
println!("{}", v[4]);
|
2013-03-27 15:53:03 -05:00
|
|
|
let v: @[int] = @[ 2, ..5 ];
|
2014-01-09 04:06:55 -06:00
|
|
|
println!("{}", v[0]);
|
|
|
|
println!("{}", v[1]);
|
|
|
|
println!("{}", v[2]);
|
|
|
|
println!("{}", v[3]);
|
|
|
|
println!("{}", v[4]);
|
2013-03-27 15:53:03 -05:00
|
|
|
}
|