検索

phrase: max: clip:
target: order:
Results of 1 - 2 of about 2 for divisor (0.004 sec.)
Option - Rust By Example 日本語版 11228
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ない整数の割り算 fn checked_division(dividend: i32, divisor: i32) -> Option<i32> { if divisor == 0 { // Failur ... nt // 結果は`Some`にラップされる。 Some(dividend / divisor) } } // This function handles a division that may ... 算を扱うことができる fn try_division(dividend: i32, divisor: i32) { // `Option` values can be pattern matched, ... ッチに使用できる。 match checked_division(dividend, divisor) { None => println!("{} / {} failed!", dividend, d ...
https://man.plustar.jp/rust/example/std/option.html - [similar]
panic! - Rust By Example 日本語版 7485
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... / 整数の除法(/)の再実装 fn division(dividend: i32, divisor: i32) -> i32 { if divisor == 0 { // Division by ze ... こす panic!("division by zero"); } else { dividend / divisor } } // The `main` task // `main`のタスク fn main() ...
https://man.plustar.jp/rust/example/std/panic.html - [similar]
PREV 1 NEXT