「Rust」関数のサンプル

書式
fn 関数名(引数)
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
fn main() {
println!("Hello, world!");
another_function();
}
fn another_function() {
println!("Hello, arkgame!");
}
fn main() { println!("Hello, world!"); another_function(); } fn another_function() { println!("Hello, arkgame!"); }
fn main() {
    println!("Hello, world!");
    another_function();
}

fn another_function() {
    println!("Hello, arkgame!");
}

実行結果
Hello, world!
Hello, arkgame!

Rust

Posted by arkgame