検索

phrase: max: clip:
target: order:
Results of 1 - 4 of about 4 for calculate (0.010 sec.)
可変個引数 - Rust By Example 日本語版 12316
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 意の数の引数を取ることができます。 前のセクションの calculate! マクロを、可変個引数に拡張することができます: mac ... ro_rules! calculate { // 単一の`eval`のためのパターン // The pattern f ... cursively (eval $e:expr, $(eval $es:expr),+) => {{ calculate! { eval $e } calculate! { $(eval $es),+ } }}; } fn ... main() { // ほら!可変な`calculate!`だよ! calculate! { // Look ma! Variadic `calculat ...
https://man.plustar.jp/rust/example/macros/variadics.html - [similar]
Domain Specific Languages (ドメイン特化言語、DSLs) - Rust By Example 日本語版 8709
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ソールに書き出されるようにしたいです。 macro_rules! calculate { (eval $e:expr) => {{ { let val: usize = $e; // F ... } = {}", stringify!{$e}, val); } }}; } fn main() { calculate! { eval 1 + 2 // hehehe `eval` is _not_ a Rust key ... rd! // `eval`はRustのキーワード *じゃない* よね! } calculate! { eval (1 + 2) * (3 / 4) } } 出力はこうなります: ...
https://man.plustar.jp/rust/example/macros/dsl.html - [similar]
Testcase: map-reduce - Rust By Example 日本語版 8562
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e Mutex es or Channel s.) In this example, we will calculate the sum of all digits in a block of numbers. We wi ... ain() { // This is our data to process. // We will calculate the sum of all digits via a threaded map-reduce al ... ns children.push(thread::spawn(move || -> u32 { // Calculate the intermediate sum of this segment: let result = ...
https://man.plustar.jp/rust/example/std_misc/threads/testcase_mapreduce.html - [similar]
繰り返し - Rust By Example 日本語版 7360
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 須ではないことに注目しましょう。 // `find_min!` will calculate the minimum of any number of arguments. // `find_m ...
https://man.plustar.jp/rust/example/macros/repeat.html - [similar]
PREV 1 NEXT