slige/examples/generic_array.slg
2025-01-17 11:50:14 +01:00

22 lines
367 B
Plaintext

mod std;
fn main() {
let strings = std::array_new::<string>();
std::array_push(strings, "hello");
std::array_push(strings, "world");
let ints = std::array_new::<int>();
std::array_push(ints, 1);
std::array_push(ints, 2);
for v in strings {
std::println(v)
}
for v in ints {
std::println(std::itos(v))
}
}