「Rust」関数のサンプル
書式
fn 関数名(引数)
使用例
fn main() {
println!("Hello, world!");
another_function();
}
fn another_function() {
println!("Hello, arkgame!");
}
実行結果
Hello, world!
Hello, arkgame!
Coding Changes the World
書式
fn 関数名(引数)
使用例
fn main() {
println!("Hello, world!");
another_function();
}
fn another_function() {
println!("Hello, arkgame!");
}
実行結果
Hello, world!
Hello, arkgame!