2013-05-20 17:07:24 -07:00
|
|
|
use std::io::println;
|
2013-03-27 13:53:03 -07:00
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2013-03-27 13:53:03 -07:00
|
|
|
let v: ~[int] = ~[ 1, ..5 ];
|
|
|
|
println(v[0].to_str());
|
|
|
|
println(v[1].to_str());
|
|
|
|
println(v[2].to_str());
|
|
|
|
println(v[3].to_str());
|
|
|
|
println(v[4].to_str());
|
|
|
|
let v: @[int] = @[ 2, ..5 ];
|
|
|
|
println(v[0].to_str());
|
|
|
|
println(v[1].to_str());
|
|
|
|
println(v[2].to_str());
|
|
|
|
println(v[3].to_str());
|
|
|
|
println(v[4].to_str());
|
|
|
|
let v: @mut [int] = @mut [ 3, ..5 ];
|
2013-06-27 17:41:35 -07:00
|
|
|
println((v[0]).to_str());
|
|
|
|
println((v[1]).to_str());
|
|
|
|
println((v[2]).to_str());
|
|
|
|
println((v[3]).to_str());
|
|
|
|
println((v[4]).to_str());
|
2013-03-27 13:53:03 -07:00
|
|
|
}
|