検索

phrase: max: clip:
target: order:
Results of 31 - 40 of about 148 for println (0.046 sec.)
cfg - Rust By Example 日本語版 6371
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... [cfg(target_os = "linux")] fn are_you_on_linux() { println!("You are running linux!"); } // And this function ... not(target_os = "linux"))] fn are_you_on_linux() { println!("You are *not* running linux!"); } fn main() { ar ... e_you_on_linux(); println!("Are you sure?"); if cfg!(target_os = "linux") { ... println!("Yes. It's definitely linux!"); } else { println!("Yes. It's definitely *not* linux!"); } } 参照 参 ...
https://man.plustar.jp/rust/example/attribute/cfg.html - [similar]
Box, スタックとヒープ - Rust By Example 日本語版 6207
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... a_box: Box<Box<Point>> = Box::new(boxed_origin()); println!("Point occupies {} bytes on the stack", mem::size ... _of_val(&point)); println!("Rectangle occupies {} bytes on the stack", mem:: ... size // ボックスのサイズはポインタのサイズに等しい println!("Boxed point occupies {} bytes on the stack", mem ... ::size_of_val(&boxed_point)); println!("Boxed rectangle occupies {} bytes on the stack", ...
https://man.plustar.jp/rust/example/std/box.html - [similar]
while - Rust By Example 日本語版 6148
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... である場合のループ while n < 101 { if n % 15 == 0 { println!("fizzbuzz"); } else if n % 3 == 0 { println!("fiz ... z"); } else if n % 5 == 0 { println!("buzz"); } else { println!("{}", n); } // Increme ... e , 関数 , Result , By , Example , Rust , エラー , println , Option , else ...
https://man.plustar.jp/rust/example/flow_control/while.html - [similar]
C言語ライクな列挙型 - Rust By Example 日本語版 6101
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ntegers. // 列挙型の中身を整数としてキャストする。 println!("zero is {}", Number::Zero as i32); println!("one ... is {}", Number::One as i32); println!("roses are #{:06x}", Color::Red as i32); println! ... 数 , 列挙 , Result , By , Example , Rust , エラー , println , Option , テストケース ...
https://man.plustar.jp/rust/example/custom_types/enum/c_like.html - [similar]
use - Rust By Example 日本語版 6101
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... `use`しているのでスコープを明示していない Rich => println!("The rich have lots of money!"), Poor => println! ... n the lack of scoping. // こちらも同じ Civilian => println!("Civilians work!"), Soldier => println!("Soldiers ... k , Result , Poor , By , Example , Rust , エラー , println ...
https://man.plustar.jp/rust/example/custom_types/enum/enum_use.html - [similar]
ネストとラベル - Rust By Example 日本語版 6101
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... llow(unreachable_code)] fn main() { 'outer: loop { println!("Entered the outer loop"); 'inner: loop { println ... r loop // こちらは外側を中断します break 'outer; } println!("This point will never be reached"); } println!(" ... , Result , By , Example , Rust , エラー , break , println , テストケース ...
https://man.plustar.jp/rust/example/flow_control/loop/nested.html - [similar]
構造体 - Rust By Example 日本語版 6101
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 1, 2), y: 3 }; match foo { Foo { x: (1, b), y } => println!("First of x is 1, b = {}, y = {} ", b, y), // you ... ネーム // 順番は重要ではない。 Foo { y: 2, x: i } => println!("y is 2, i = {:?}", i), // and you can also ignor ... 一部の変数を無視することもできる。 Foo { y, .. } => println!("y = {}, we don't care about x", y), // this will ... していないため、以下はエラーになる。 //Foo { y } => println!("y = {}", y), } } 参照 構造体 関連キーワード: 関数 ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
ハッシュマップ - Rust By Example 日本語版 5984
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 。 match contacts.get(&"Daniel") { Some(&number) => println!("Calling Daniel: {}", call(number)), _ => println ... ; match contacts.get(&"Ashley") { Some(&number) => println!("Calling Ashley: {}", call(number)), _ => println ... タを返す for (contact, &number) in contacts.iter() { println!("Calling {}: {}", contact, call(number)); } } ハッ ...
https://man.plustar.jp/rust/example/std/hash.html - [similar]
リテラル - Rust By Example 日本語版 5984
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... / `size_of_val` 関数は変数のサイズをバイトで返す。 println!("size of `x` in bytes: {}", std::mem::size_of_val ... (&x)); println!("size of `y` in bytes: {}", std::mem::size_of_val ... (&y)); println!("size of `z` in bytes: {}", std::mem::size_of_val ... (&z)); println!("size of `i` in bytes: {}", std::mem::size_of_val ...
https://man.plustar.jp/rust/example/types/literals.html - [similar]
列挙型 - Rust By Example 日本語版 5937
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... t: WebEvent) { match event { WebEvent::PageLoad => println!("page loaded"), WebEvent::PageUnload => println!( ... ` from inside the `enum`. WebEvent::KeyPress(c) => println!("pressed '{}'.", c), WebEvent::Paste(s) => printl ... k` into `x` and `y`. WebEvent::Click { x, y } => { println!("clicked at x={}, y={}.", x, y); }, } } fn main() ...
https://man.plustar.jp/rust/example/custom_types/enum.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 12 13 NEXT