検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 148 for println (0.078 sec.)
タプル - Rust By Example 日本語版 7885
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... インデックスを用いて、タプル内の要素を参照できる。 println!("long tuple first value: {}", long_tuple.0); prin ... ples are printable // タプルはプリント可能である。 println!("tuple of tuples: {:?}", tuple_of_tuples); // But ... = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); // println!("too long tuple: {:?}", too_long_tuple); // TODO ... ンパイルエラーになることを確認 let pair = (1, true); println!("pair is {:?}", pair); println!("the reversed pai ...
https://man.plustar.jp/rust/example/primitives/tuples.html - [similar]
列挙型 - Rust By Example 日本語版 7392
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... lor` // TODO ^ `Color`に別の変数を入れてみましょう println!("What color is it?"); // An `enum` can be destruc ... ラクトすることができる。 match color { Color::Red => println!("The color is Red!"), Color::Blue => println!("Th ... e color is Blue!"), Color::Green => println!("The color is Green!"), Color::RGB(r, g, b) => pr ... , and blue: {}!", r, g, b), Color::HSV(h, s, v) => println!("Hue: {}, saturation: {}, value: {}!", h, s, v), ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
スコープとシャドーイング - Rust By Example 日本語版 7392
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ク内のみに存在します。 let short_lived_binding = 2; println!("inner short: {}", short_lived_binding); // This ... ドーイング* します。 let long_lived_binding = 5_f32; println!("inner long: {}", long_lived_binding); } // End o ... このスコープ内には存在しませんのでエラーとなります。 println!("outer short: {}", short_lived_binding); // FIXME ... out this line // FIXME ^ コメントアウトしましょう println!("outer long: {}", long_lived_binding); // This bi ...
https://man.plustar.jp/rust/example/variable_bindings/scope.html - [similar]
ガード - Rust By Example 日本語版 7240
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... `pair` // TODO ^ `pair`の値を変更してみましょう。 println!("Tell me about {:?}", pair); match pair { (x, y) ... if x == y => println!("These are twins"), // The ^ `if condition` part ... れに続く条件式がガードです。 (x, y) if x + y == 0 => println!("Antimatter, kaboom!"), (x, _) if x % 2 == 1 => p ... rintln!("The first one is odd"), _ => println!("No correlation..."), } } Note that the compiler ...
https://man.plustar.jp/rust/example/flow_control/match/guard.html - [similar]
フォーマットしてプリント - Rust By Example 日本語版 7240
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... コンソール (io::stdout) にそのテキストを出力します。 println! : print! : と同じですが改行が付け加えられます。 e ... ラー出力 (io::stderr) にそのテキストを出力します。 eprintln! : eprint! と同じですが改行が付け加えられます。 す ... き換えられます。 // 例えば以下は文字列に変換されます println!("{} days", 31); // Without a suffix, 31 becomes a ... の位置から埋め込まれる場所を指定することができます。 println!("{0}, this is {1}. {1}, this is {0}", "Alice", "B ...
https://man.plustar.jp/rust/example/hello/print.html - [similar]
プライベートとパブリック - Rust By Example 日本語版 7240
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 素はデフォルトでプライベート fn private_function() { println!("called `my_mod::private_function()`"); } // Use ... `pub`を用いてパブリックに変更 pub fn function() { println!("called `my_mod::function()`"); } // Items can ac ... lso be nested pub mod nested { pub fn function() { println!("called `my_mod::nested::function()`"); } #[allow ... (dead_code)] fn private_function() { println!("called `my_mod::nested::private_function()`"); } ...
https://man.plustar.jp/rust/example/mod/visibility.html - [similar]
配列とスライス - Rust By Example 日本語版 7240
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... スライスを借用する fn analyze_slice(slice: &[i32]) { println!("first element of the slice: {}", slice[0]); prin ... 0]; // Indexing starts at 0 // インデックスは0から println!("first element of the array: {}", xs[0]); println ... ements in the array // `len`は配列の要素数を返す。 println!("number of elements in array: {}", xs.len()); // ... are stack allocated // 配列はスタック上に置かれる println!("array occupies {} bytes", mem::size_of_val(&xs)) ...
https://man.plustar.jp/rust/example/primitives/array.html - [similar]
ディスプレイ - Rust By Example 日本語版 7122
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... `write!` uses syntax which // is very similar to `println!`. // 厳密に最初の要素を、与えられた出力ストリーム ... ションが成功したか否か // を表します。 // `write!`は`println!`に非常によく似た文法を使用していることに注目。 wr ... elf.y) } } fn main() { let minmax = MinMax(0, 14); println!("Compare structures:"); println!("Display: {}", m ... inmax); println!("Debug: {:?}", minmax); let big_range = MinMax(-3 ...
https://man.plustar.jp/rust/example/hello/print/print_display.html - [similar]
エイリアス - Rust By Example 日本語版 7017
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... の持ち主と参照の両方からアクセスすることができます。 println!("Point has coordinates: ({}, {}, {})", borrowed_p ... is line // The borrowed values are used again here println!("Point has coordinates: ({}, {}, {})", borrowed_p ... ントしてみましょう。 // Error! Can't print because `println!` takes an immutable reference. // エラー!`println ... タブルなリファレンスを取るため、printできません。 // println!("Point Z coordinate is {}", point.z); // TODO ^ T ...
https://man.plustar.jp/rust/example/scope/borrow/alias.html - [similar]
バインディング - Rust By Example 日本語版 6852
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 32`の値を返す。 fn age() -> u32 { 15 } fn main() { println!("Tell me what type of person you are"); match age ... () { 0 => println!("I haven't celebrated my first birthday yet"), // ... ンディングすることで値を使用できる。 n @ 1 ..= 12 => println!("I'm a child of age {:?}", n), n @ 13 ..= 19 => p ... urn the result. // マッチしなかった場合の処理 n => println!("I'm an old person of age {:?}", n), } } You can ...
https://man.plustar.jp/rust/example/flow_control/match/binding.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 NEXT