]> git.lizzy.rs Git - rust.git/blob - src/doc/po/ja/rust.md.po
doc: Remove all uses of `~str` from the documentation.
[rust.git] / src / doc / po / ja / rust.md.po
1 # Japanese translations for Rust package
2 # Copyright (C) 2013-2014 The Rust Project Developers
3 # This file is distributed under the same license as the Rust package.
4 # Automatically generated, 2013.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: Rust 0.8\n"
9 "POT-Creation-Date: 2014-02-03 08:13+0900\n"
10 "PO-Revision-Date: 2013-08-05 19:40+0900\n"
11 "Last-Translator: Automatically generated\n"
12 "Language-Team: none\n"
13 "Language: ja\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "Plural-Forms: nplurals=1; plural=0;\n"
18
19 #. type: Plain text
20 #: src/doc/complement-cheatsheet.md:115 src/doc/rust.md:3019
21 #, fuzzy
22 msgid "# Type system"
23 msgstr "## タプル"
24
25 #. type: Plain text
26 #: src/doc/guide-conditions.md:4 src/doc/guide-ffi.md:4
27 #: src/doc/guide-lifetimes.md:4 src/doc/guide-macros.md:4
28 #: src/doc/guide-tasks.md:4 src/doc/rust.md:4 src/doc/tutorial.md:4
29 msgid "# Introduction"
30 msgstr "# イントロダクション"
31
32 #. type: Plain text
33 #: src/doc/rust.md:2
34 #, fuzzy
35 #| msgid "% The Rust Language Tutorial"
36 msgid "% The Rust Reference Manual"
37 msgstr "% Rust 言語チュートリアル"
38
39 #. type: Plain text
40 #: src/doc/rust.md:54
41 #, fuzzy
42 #| msgid "## Conventions"
43 msgid "# Notation"
44 msgstr "## 本書の表記について"
45
46 #. type: Plain text
47 #: src/doc/rust.md:91
48 #, fuzzy
49 #| msgid "# Introduction"
50 msgid "## Unicode productions"
51 msgstr "# イントロダクション"
52
53 #. type: Plain text
54 #: src/doc/rust.md:98
55 #, fuzzy
56 #| msgid "## Using other crates"
57 msgid "## String table productions"
58 msgstr "## 他のクレートの利用"
59
60 #. type: Plain text
61 #: src/doc/rust.md:113
62 #, fuzzy
63 #| msgid "# Data structures"
64 msgid "# Lexical structure"
65 msgstr "# データ構造"
66
67 #. type: Plain text
68 #: src/doc/rust.md:123
69 #, fuzzy
70 #| msgid "# Introduction"
71 msgid "## Special Unicode Productions"
72 msgstr "# イントロダクション"
73
74 #. type: Plain text
75 #: src/doc/rust.md:128
76 #, fuzzy
77 #| msgid "## Operators"
78 msgid "### Identifiers"
79 msgstr "## 演算子"
80
81 #. type: Plain text
82 #: src/doc/rust.md:141
83 #, fuzzy
84 #| msgid "## Using other crates"
85 msgid "### Delimiter-restricted productions"
86 msgstr "## 他のクレートの利用"
87
88 #. type: Plain text
89 #: src/doc/rust.md:152
90 #, fuzzy
91 #| msgid "## Conventions"
92 msgid "## Comments"
93 msgstr "## 本書の表記について"
94
95 #. type: Plain text
96 #: src/doc/rust.md:190
97 #, fuzzy
98 #| msgid "## Tuples"
99 msgid "## Tokens"
100 msgstr "## タプル"
101
102 #. type: Plain text
103 #: src/doc/rust.md:202
104 #, fuzzy
105 #| msgid "## Tuples"
106 msgid "### Keywords"
107 msgstr "## タプル"
108
109 #. type: Plain text
110 #: src/doc/rust.md:204
111 #, fuzzy
112 #| msgid "## Primitive types and literals"
113 msgid "The keywords are the following strings:"
114 msgstr "## プリミティブ型とリテラル"
115
116 #. type: Plain text
117 #: src/doc/rust.md:226
118 #, fuzzy
119 #| msgid "## Operators"
120 msgid "### Literals"
121 msgstr "## 演算子"
122
123 #. type: Plain text
124 #: src/doc/rust.md:238
125 #, fuzzy
126 #| msgid "# Vectors and strings"
127 msgid "#### Character and string literals"
128 msgstr "# ベクタと文字列"
129
130 #. type: Plain text
131 #: src/doc/rust.md:307
132 #, fuzzy
133 #| msgid "# Vectors and strings"
134 msgid "Examples for string literals:"
135 msgstr "# ベクタと文字列"
136
137 #. type: Plain text
138 #: src/doc/rust.md:320
139 #, fuzzy
140 #| msgid "# Control structures"
141 msgid "#### Number literals"
142 msgstr "# 制御構造"
143
144 #. type: Plain text
145 #: src/doc/rust.md:345
146 #, fuzzy
147 #| msgid "# Control structures"
148 msgid "##### Integer literals"
149 msgstr "# 制御構造"
150
151 #. type: Plain text
152 #: src/doc/rust.md:347
153 #, fuzzy
154 #| msgid "# Vectors and strings"
155 msgid "An _integer literal_ has one of four forms:"
156 msgstr "# ベクタと文字列"
157
158 #. type: Plain text
159 #: src/doc/rust.md:375
160 #, fuzzy
161 #| msgid "# Vectors and strings"
162 msgid "Examples of integer literals of various forms:"
163 msgstr "# ベクタと文字列"
164
165 #. type: Plain text
166 #: src/doc/rust.md:389
167 #, fuzzy
168 #| msgid "# Control structures"
169 msgid "##### Floating-point literals"
170 msgstr "# 制御構造"
171
172 #. type: Plain text
173 #: src/doc/rust.md:391
174 #, fuzzy
175 #| msgid "# Vectors and strings"
176 msgid "A _floating-point literal_ has one of two forms:"
177 msgstr "# ベクタと文字列"
178
179 #. type: Plain text
180 #: src/doc/rust.md:404
181 #, fuzzy
182 #| msgid "# Vectors and strings"
183 msgid "Examples of floating-point literals of various forms:"
184 msgstr "# ベクタと文字列"
185
186 #. type: Plain text
187 #: src/doc/rust.md:413
188 #, fuzzy
189 #| msgid "# Control structures"
190 msgid "##### Unit and boolean literals"
191 msgstr "# 制御構造"
192
193 #. type: Plain text
194 #: src/doc/rust.md:418
195 #, fuzzy
196 #| msgid "## Tuples"
197 msgid "### Symbols"
198 msgstr "## タプル"
199
200 #. type: Plain text
201 #: src/doc/rust.md:459
202 #, fuzzy
203 #| msgid "~~~~ {.ignore} let foo = 10;"
204 msgid "~~~~ {.ignore} x; x::y::z; ~~~~"
205 msgstr ""
206 "~~~~ {.ignore}\n"
207 "let foo = 10;"
208
209 #. type: Plain text
210 #: src/doc/rust.md:468
211 #, fuzzy
212 #| msgid "# Vectors and strings"
213 msgid "Two examples of paths with type arguments:"
214 msgstr "# ベクタと文字列"
215
216 #. type: Plain text
217 #: src/doc/rust.md:479
218 #, fuzzy
219 #| msgid "## Syntax extensions"
220 msgid "# Syntax extensions"
221 msgstr "## 構文拡張"
222
223 #. type: Plain text
224 #: src/doc/rust.md:497
225 #, fuzzy
226 #| msgid "## Syntax extensions"
227 msgid "## Macros"
228 msgstr "## 構文拡張"
229
230 #. type: Plain text
231 #: src/doc/rust.md:525
232 #, fuzzy
233 #| msgid "## A minimal example"
234 msgid "### Macro By Example"
235 msgstr "## 最小限の例"
236
237 #. type: Plain text
238 #: src/doc/rust.md:561
239 #, fuzzy
240 #| msgid "## Pattern matching"
241 msgid "### Parsing limitations"
242 msgstr "## パターンマッチ"
243
244 #. type: Plain text
245 #: src/doc/rust.md:580
246 #, fuzzy
247 #| msgid "# Modules and crates"
248 msgid "# Crates and source files"
249 msgstr "# モジュールとクレート"
250
251 #. type: Plain text
252 #: src/doc/rust.md:627
253 #, fuzzy
254 #| msgid "// Turn on a warning #[warn(non_camel_case_types)]"
255 msgid "// Turn on a warning #![ warn(non_camel_case_types) ] ~~~~"
256 msgstr ""
257 "// 警告を有効にする\n"
258 "#[warn(non_camel_case_types)]"
259
260 #. type: Plain text
261 #: src/doc/rust.md:632
262 #, fuzzy
263 #| msgid "# Vectors and strings"
264 msgid "# Items and attributes"
265 msgstr "# ベクタと文字列"
266
267 #. type: Plain text
268 #: src/doc/rust.md:637
269 #, fuzzy
270 #| msgid "## Operators"
271 msgid "## Items"
272 msgstr "## 演算子"
273
274 #. type: Plain text
275 #: src/doc/rust.md:674
276 #, fuzzy
277 #| msgid "## Tuples"
278 msgid "### Type Parameters"
279 msgstr "## タプル"
280
281 #. type: Plain text
282 #: src/doc/rust.md:685
283 #, fuzzy
284 #| msgid "## Tuples"
285 msgid "### Modules"
286 msgstr "## タプル"
287
288 #. type: Plain text
289 #: src/doc/rust.md:701
290 #, fuzzy
291 #| msgid "## A minimal example"
292 msgid "An example of a module:"
293 msgstr "## 最小限の例"
294
295 #. type: Plain text
296 #: src/doc/rust.md:753
297 #, fuzzy
298 #| msgid "## Structs"
299 msgid "#### View items"
300 msgstr "## 構造体"
301
302 #. type: Plain text
303 #: src/doc/rust.md:766
304 #, fuzzy
305 #| msgid "## Using other crates"
306 msgid "##### Extern mod declarations"
307 msgstr "## 他のクレートの利用"
308
309 #. type: Plain text
310 #: src/doc/rust.md:786
311 #, fuzzy
312 #| msgid "## Using other crates"
313 msgid "Four examples of `extern crate` declarations:"
314 msgstr "## 他のクレートの利用"
315
316 #. type: Plain text
317 #: src/doc/rust.md:789
318 #, fuzzy
319 #| msgid "~~~~ {.ignore} let foo = 10;"
320 msgid "~~~~ {.ignore} extern crate pcre;"
321 msgstr ""
322 "~~~~ {.ignore}\n"
323 "let foo = 10;"
324
325 #. type: Plain text
326 #: src/doc/rust.md:798
327 #, fuzzy
328 #| msgid "## Conventions"
329 msgid "##### Use declarations"
330 msgstr "## 本書の表記について"
331
332 #. type: Plain text
333 #: src/doc/rust.md:826
334 #, fuzzy
335 #| msgid "## Using other crates"
336 msgid "An example of `use` declarations:"
337 msgstr "## 他のクレートの利用"
338
339 #. type: Plain text
340 #: src/doc/rust.md:830
341 #, fuzzy
342 #| msgid "~~~~ use std::task::spawn;"
343 msgid "~~~~ use std::num::sin; use std::option::{Some, None};"
344 msgstr ""
345 "~~~~\n"
346 "use std::task::spawn;"
347
348 #. type: Plain text
349 #: src/doc/rust.md:851
350 #, fuzzy
351 #| msgid "## A minimal example"
352 msgid "An example of re-exporting:"
353 msgstr "## 最小限の例"
354
355 #. type: Plain text
356 #: src/doc/rust.md:875
357 #, fuzzy
358 #| msgid "## A minimal example"
359 msgid "An example of what will and will not work for `use` items:"
360 msgstr "## 最小限の例"
361
362 #. type: Plain text
363 #: src/doc/rust.md:883
364 #, fuzzy, no-wrap
365 #| msgid "~~~~ {.ignore} let foo = 10;"
366 msgid ""
367 "mod foo {\n"
368 "    extern crate extra;\n"
369 msgstr ""
370 "~~~~ {.ignore}\n"
371 "let foo = 10;"
372
373 #. type: Plain text
374 #: src/doc/rust.md:901
375 #, fuzzy
376 #| msgid ""
377 #| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
378 #| "\" + world::explore()); } ~~~~"
379 msgid "fn main() {} ~~~~"
380 msgstr ""
381 "~~~~ {.ignore}\n"
382 "// main.rs\n"
383 "extern crate world;\n"
384 "fn main() { println(~\"hello \" + world::explore()); }\n"
385 "~~~~"
386
387 #. type: Plain text
388 #: src/doc/rust.md:903
389 #, fuzzy
390 #| msgid "# Functions"
391 msgid "### Functions"
392 msgstr "# 関数"
393
394 #. type: Plain text
395 #: src/doc/rust.md:920
396 #, fuzzy
397 #| msgid "## A minimal example"
398 msgid "An example of a function:"
399 msgstr "## 最小限の例"
400
401 #. type: Plain text
402 #: src/doc/rust.md:926
403 #, fuzzy, no-wrap
404 #| msgid "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
405 msgid ""
406 "~~~~\n"
407 "fn add(x: int, y: int) -> int {\n"
408 "    return x + y;\n"
409 "}\n"
410 "~~~~\n"
411 msgstr ""
412 "~~~~\n"
413 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
414 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
415
416 #. type: Plain text
417 #: src/doc/rust.md:933
418 #, fuzzy
419 #| msgid "~~~ fn first((value, _): (int, f64)) -> int { value } ~~~"
420 msgid "~~~~ fn first((value, _): (int, int)) -> int { value } ~~~~"
421 msgstr ""
422 "~~~\n"
423 "fn first((value, _): (int, f64)) -> int { value }\n"
424 "~~~"
425
426 #. type: Plain text
427 #: src/doc/rust.md:936
428 #, fuzzy
429 #| msgid "## Conventions"
430 msgid "#### Generic functions"
431 msgstr "## 本書の表記について"
432
433 #. type: Plain text
434 #: src/doc/rust.md:974
435 #, fuzzy
436 #| msgid "~~~~ let square = |x: int| -> uint { (x * x) as uint }; ~~~~"
437 msgid "~~~~ fn id<T>(x: T) -> T { x } ~~~~"
438 msgstr ""
439 "~~~~\n"
440 "let square = |x: int| -> uint { (x * x) as uint };\n"
441 "~~~~~~~~\n"
442
443 #. type: Plain text
444 #: src/doc/rust.md:981
445 #, fuzzy
446 #| msgid "## Conventions"
447 msgid "#### Unsafety"
448 msgstr "## 本書の表記について"
449
450 #. type: Bullet: '  - '
451 #: src/doc/rust.md:988
452 #, fuzzy
453 #| msgid "# Dereferencing pointers"
454 msgid "Dereferencing a [raw pointer](#pointer-types)."
455 msgstr "# ポインタのデリファレンス"
456
457 #. type: Plain text
458 #: src/doc/rust.md:990
459 #, fuzzy
460 #| msgid "## Conventions"
461 msgid "##### Unsafe functions"
462 msgstr "## 本書の表記について"
463
464 #. type: Plain text
465 #: src/doc/rust.md:995
466 #, fuzzy
467 #| msgid "## Conventions"
468 msgid "##### Unsafe blocks"
469 msgstr "## 本書の表記について"
470
471 #. type: Bullet: '* '
472 #: src/doc/rust.md:1037
473 #, fuzzy
474 #| msgid "# Data structures"
475 msgid "Data races"
476 msgstr "# データ構造"
477
478 #. type: Bullet: '* '
479 #: src/doc/rust.md:1037
480 #, fuzzy
481 #| msgid "# Dereferencing pointers"
482 msgid "Dereferencing a null/dangling raw pointer"
483 msgstr "# ポインタのデリファレンス"
484
485 #. type: Plain text
486 #: src/doc/rust.md:1052
487 #, fuzzy
488 #| msgid "## Conventions"
489 msgid "#### Diverging functions"
490 msgstr "## 本書の表記について"
491
492 #. type: Plain text
493 #: src/doc/rust.md:1088
494 #, fuzzy, no-wrap
495 #| msgid "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
496 msgid ""
497 "fn f(i: int) -> int {\n"
498 "   if i == 42 {\n"
499 "     return 42;\n"
500 "   }\n"
501 "   else {\n"
502 "     my_err(\"Bad number!\");\n"
503 "   }\n"
504 "}\n"
505 "~~~~\n"
506 msgstr ""
507 "~~~~\n"
508 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
509 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
510
511 #. type: Plain text
512 #: src/doc/rust.md:1099
513 #, fuzzy
514 #| msgid "## Conventions"
515 msgid "#### Extern functions"
516 msgstr "## 本書の表記について"
517
518 #. type: Plain text
519 #: src/doc/rust.md:1128
520 #, fuzzy
521 #| msgid "## Conventions"
522 msgid "### Type definitions"
523 msgstr "## 本書の表記について"
524
525 #. type: Bullet: '* '
526 #: src/doc/rust.md:1138
527 #, fuzzy
528 #| msgid "# Closures"
529 msgid "Whether the value represents integral or floating-point information."
530 msgstr "# クロージャ"
531
532 #. type: Plain text
533 #: src/doc/rust.md:1143
534 #, fuzzy
535 #| msgid "## Structs"
536 msgid "### Structures"
537 msgstr "## 構造体"
538
539 #. type: Plain text
540 #: src/doc/rust.md:1147
541 #, fuzzy
542 #| msgid "## A minimal example"
543 msgid "An example of a `struct` item and its use:"
544 msgstr "## 最小限の例"
545
546 #. type: Plain text
547 #: src/doc/rust.md:1153
548 #, fuzzy
549 #| msgid ""
550 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
551 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
552 msgid ""
553 "~~~~ struct Point {x: int, y: int} let p = Point {x: 10, y: 11}; let px: int "
554 "= p.x; ~~~~"
555 msgstr ""
556 "~~~\n"
557 "# struct Point { x: f64, y: f64 }\n"
558 "let point = &@~Point { x: 10f, y: 20f };\n"
559 "println(fmt!(\"%f\", point.x));\n"
560 "~~~"
561
562 #. type: Plain text
563 #: src/doc/rust.md:1162
564 #, fuzzy
565 #| msgid ""
566 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
567 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
568 msgid ""
569 "~~~~ struct Point(int, int); let p = Point(10, 11); let px: int = match p "
570 "{ Point(x, _) => x }; ~~~~"
571 msgstr ""
572 "~~~\n"
573 "# struct Point { x: f64, y: f64 }\n"
574 "let point = &@~Point { x: 10f, y: 20f };\n"
575 "println(fmt!(\"%f\", point.x));\n"
576 "~~~"
577
578 #. type: Plain text
579 #: src/doc/rust.md:1173
580 #, fuzzy
581 #| msgid "## Enums"
582 msgid "### Enumerations"
583 msgstr "## 列挙型"
584
585 #. type: Plain text
586 #: src/doc/rust.md:1180
587 #, fuzzy
588 #| msgid "## A minimal example"
589 msgid "An example of an `enum` item and its use:"
590 msgstr "## 最小限の例"
591
592 #. type: Plain text
593 #: src/doc/rust.md:1207
594 #, fuzzy
595 #| msgid "## Structs"
596 msgid "### Static items"
597 msgstr "## 構造体"
598
599 #. type: Plain text
600 #: src/doc/rust.md:1243
601 #, fuzzy
602 #| msgid "# Move semantics"
603 msgid "#### Mutable statics"
604 msgstr "# ムーブセマンティクス"
605
606 #. type: Plain text
607 #: src/doc/rust.md:1257
608 #, fuzzy
609 #| msgid ""
610 #| "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, "
611 #| "b: int, x: int) -> ()  { a * x + b; }"
612 msgid "~~~~ # fn atomic_add(_: &mut uint, _: uint) -> uint { 2 }"
613 msgstr ""
614 "~~~~\n"
615 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
616 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
617
618 #. type: Plain text
619 #: src/doc/rust.md:1277
620 #, fuzzy
621 #| msgid "## Traits"
622 msgid "### Traits"
623 msgstr "## トレイト"
624
625 #. type: Plain text
626 #: src/doc/rust.md:1366
627 #, fuzzy
628 #| msgid "Enum variants may also be structs. For example:"
629 msgid "Traits may inherit from other traits. For example, in"
630 msgstr "以下の例のように、列挙型バリアントを構造体にすることも可能です。"
631
632 #. type: Plain text
633 #: src/doc/rust.md:1371
634 #, fuzzy
635 #| msgid ""
636 #| "~~~~ trait Shape { fn area(&self) -> f64; } trait Circle : Shape { fn "
637 #| "radius(&self) -> f64; } ~~~~"
638 msgid ""
639 "~~~~ trait Shape { fn area() -> f64; } trait Circle : Shape { fn radius() -> "
640 "f64; } ~~~~"
641 msgstr ""
642 "~~~~\n"
643 "trait Shape { fn area(&self) -> f64; }\n"
644 "trait Circle : Shape { fn radius(&self) -> f64; }\n"
645 "~~~~"
646
647 #. type: Plain text
648 #: src/doc/rust.md:1380
649 #, fuzzy
650 #| msgid ""
651 #| "In type-parameterized functions, methods of the supertrait may be called "
652 #| "on values of subtrait-bound type parameters.  Refering to the previous "
653 #| "example of `trait Circle : Shape`:"
654 msgid ""
655 "In type-parameterized functions, methods of the supertrait may be called on "
656 "values of subtrait-bound type parameters.  Referring to the previous example "
657 "of `trait Circle : Shape`:"
658 msgstr ""
659 "型パラメータを持つ関数では、サブトレイトの境界型パラメータの値によりスーパー"
660 "トレイトのメソッドを呼び出すことになります。前の例の `trait Circle : Shape` "
661 "を参照してください。"
662
663 #. type: Plain text
664 #: src/doc/rust.md:1389
665 #, fuzzy, no-wrap
666 #| msgid ""
667 #| "~~~\n"
668 #| "# trait Shape { fn area(&self) -> f64; }\n"
669 #| "# trait Circle : Shape { fn radius(&self) -> f64; }\n"
670 #| "fn radius_times_area<T: Circle>(c: T) -> f64 {\n"
671 #| "    // `c` is both a Circle and a Shape\n"
672 #| "    c.radius() * c.area()\n"
673 #| "}\n"
674 #| "~~~\n"
675 msgid ""
676 "~~~~\n"
677 "# trait Shape { fn area(&self) -> f64; }\n"
678 "# trait Circle : Shape { fn radius(&self) -> f64; }\n"
679 "fn radius_times_area<T: Circle>(c: T) -> f64 {\n"
680 "    // `c` is both a Circle and a Shape\n"
681 "    c.radius() * c.area()\n"
682 "}\n"
683 "~~~~\n"
684 msgstr ""
685 "~~~\n"
686 "# trait Shape { fn area(&self) -> f64; }\n"
687 "# trait Circle : Shape { fn radius(&self) -> f64; }\n"
688 "fn radius_times_area<T: Circle>(c: T) -> f64 {\n"
689 "    // `c` は Circle でもあり、Shape でもある\n"
690 "    c.radius() * c.area()\n"
691 "}\n"
692 "~~~\n"
693
694 #. type: Plain text
695 #: src/doc/rust.md:1391 src/doc/tutorial.md:2495
696 msgid "Likewise, supertrait methods may also be called on trait objects."
697 msgstr ""
698 "同様に、スーパートレイトのメソッドは、トレイトオブジェクトについても呼び出す"
699 "ことが可能です。"
700
701 #. type: Plain text
702 #: src/doc/rust.md:1398
703 #, fuzzy
704 #| msgid ""
705 #| "~~~ {.ignore} use std::f64::consts::pi; # trait Shape { fn area(&self) -> "
706 #| "f64; } # trait Circle : Shape { fn radius(&self) -> f64; } # struct Point "
707 #| "{ x: f64, y: f64 } # struct CircleStruct { center: Point, radius: f64 } # "
708 #| "impl Circle for CircleStruct { fn radius(&self) -> f64 { (self.area() / "
709 #| "pi).sqrt() } } # impl Shape for CircleStruct { fn area(&self) -> f64 { pi "
710 #| "* square(self.radius) } }"
711 msgid ""
712 "~~~~ {.ignore} # trait Shape { fn area(&self) -> f64; } # trait Circle : "
713 "Shape { fn radius(&self) -> f64; } # impl Shape for int { fn area(&self) -> "
714 "f64 { 0.0 } } # impl Circle for int { fn radius(&self) -> f64 { 0.0 } } # "
715 "let mycircle = 0;"
716 msgstr ""
717 "~~~ {.ignore}\n"
718 "use std::f64::consts::pi;\n"
719 "# trait Shape { fn area(&self) -> f64; }\n"
720 "# trait Circle : Shape { fn radius(&self) -> f64; }\n"
721 "# struct Point { x: f64, y: f64 }\n"
722 "# struct CircleStruct { center: Point, radius: f64 }\n"
723 "# impl Circle for CircleStruct { fn radius(&self) -> f64 { (self.area() / "
724 "pi).sqrt() } }\n"
725 "# impl Shape for CircleStruct { fn area(&self) -> f64 { pi * square(self."
726 "radius) } }"
727
728 #. type: Plain text
729 #: src/doc/rust.md:1402
730 #, fuzzy
731 #| msgid ""
732 #| "let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f}; let "
733 #| "mycircle: @Circle = concrete as @Circle; let nonsense = mycircle.radius() "
734 #| "* mycircle.area(); ~~~"
735 msgid ""
736 "let mycircle: Circle = @mycircle as @Circle; let nonsense = mycircle."
737 "radius() * mycircle.area(); ~~~~"
738 msgstr ""
739 "let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};\n"
740 "let mycircle: @Circle = concrete as @Circle;\n"
741 "let nonsense = mycircle.radius() * mycircle.area();\n"
742 "~~~"
743
744 #. type: Plain text
745 #: src/doc/rust.md:1404
746 #, fuzzy
747 #| msgid "# Introduction"
748 msgid "### Implementations"
749 msgstr "# イントロダクション"
750
751 #. type: Plain text
752 #: src/doc/rust.md:1420
753 #, fuzzy, no-wrap
754 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
755 msgid ""
756 "struct Circle {\n"
757 "    radius: f64,\n"
758 "    center: Point,\n"
759 "}\n"
760 msgstr ""
761 "~~~~ {.ignore}\n"
762 "// main.rs\n"
763 "extern crate world;\n"
764 "fn main() { println(~\"hello \" + world::explore()); }\n"
765 "~~~~"
766
767 #. type: Plain text
768 #: src/doc/rust.md:1458
769 #, fuzzy
770 #| msgid "## Conventions"
771 msgid "### External blocks"
772 msgstr "## 本書の表記について"
773
774 #. type: Plain text
775 #: src/doc/rust.md:1644 src/doc/rust.md:1665
776 #, fuzzy
777 #| msgid ""
778 #| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
779 #| "\" + world::explore()); } ~~~~"
780 msgid "# fn main() {} ~~~~"
781 msgstr ""
782 "~~~~ {.ignore}\n"
783 "// main.rs\n"
784 "extern crate world;\n"
785 "fn main() { println(~\"hello \" + world::explore()); }\n"
786 "~~~~"
787
788 #. type: Plain text
789 #: src/doc/rust.md:1650
790 #, fuzzy
791 #| msgid "# Dereferencing pointers"
792 msgid "### Re-exporting and Visibility"
793 msgstr "# ポインタのデリファレンス"
794
795 #. type: Plain text
796 #: src/doc/rust.md:1674
797 #, fuzzy
798 #| msgid "## Managed closures"
799 msgid "### Glob imports and Visibility"
800 msgstr "## マネージドクロージャ"
801
802 #. type: Plain text
803 #: src/doc/rust.md:1684
804 #, fuzzy
805 #| msgid "# Vectors and strings"
806 msgid "## Attributes"
807 msgstr "# ベクタと文字列"
808
809 #. type: Plain text
810 #: src/doc/rust.md:1706
811 #, fuzzy
812 #| msgid "# Vectors and strings"
813 msgid "An example of attributes:"
814 msgstr "# ベクタと文字列"
815
816 #. type: Plain text
817 #: src/doc/rust.md:1754
818 #, fuzzy
819 #| msgid "# Vectors and strings"
820 msgid "### Lint check attributes"
821 msgstr "# ベクタと文字列"
822
823 #. type: Plain text
824 #: src/doc/rust.md:1823
825 #, fuzzy
826 #| msgid "## Structs"
827 msgid "### Language items"
828 msgstr "## 構造体"
829
830 #. type: Plain text
831 #: src/doc/rust.md:1844
832 #, fuzzy
833 #| msgid "## Traits"
834 msgid "#### Traits"
835 msgstr "## トレイト"
836
837 #. type: Plain text
838 #: src/doc/rust.md:1885
839 #, fuzzy
840 #| msgid "## Operators"
841 msgid "#### Operations"
842 msgstr "## 演算子"
843
844 #. type: Plain text
845 #: src/doc/rust.md:1920
846 #, fuzzy
847 #| msgid "# Vectors and strings"
848 msgid "### Inline attributes"
849 msgstr "# ベクタと文字列"
850
851 #. type: Plain text
852 #: src/doc/rust.md:1933
853 #, fuzzy
854 #| msgid "Our example crate declared this set of `link` attributes:"
855 msgid "There are three different types of inline attributes:"
856 msgstr ""
857 "先ほどのクレートの例では、 `link` 属性は以下のように宣言されていました。"
858
859 #. type: Plain text
860 #: src/doc/rust.md:1939
861 #, fuzzy
862 #| msgid "## Freezing"
863 msgid "### Deriving"
864 msgstr "## 凍結"
865
866 #. type: Plain text
867 #: src/doc/rust.md:1953
868 #, fuzzy, no-wrap
869 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
870 msgid ""
871 "~~~~\n"
872 "#[deriving(Eq, Clone)]\n"
873 "struct Foo<T> {\n"
874 "    a: int,\n"
875 "    b: T\n"
876 "}\n"
877 "~~~~\n"
878 msgstr ""
879 "~~~~ {.ignore}\n"
880 "// main.rs\n"
881 "extern crate world;\n"
882 "fn main() { println(~\"hello \" + world::explore()); }\n"
883 "~~~~"
884
885 #. type: Plain text
886 #: src/doc/rust.md:2008
887 #, fuzzy
888 #| msgid "~~~~ use std::task::spawn;"
889 msgid "~~~~ {.ignore} #![warn(unstable)]"
890 msgstr ""
891 "~~~~\n"
892 "use std::task::spawn;"
893
894 #. type: Plain text
895 #: src/doc/rust.md:2037
896 #, fuzzy
897 #| msgid "## Crates"
898 msgid "### Compiler Features"
899 msgstr "## クレート"
900
901 #. type: Plain text
902 #: src/doc/rust.md:2125
903 #, fuzzy
904 #| msgid "## Syntax extensions"
905 msgid "# Statements and expressions"
906 msgstr "## 構文拡張"
907
908 #. type: Plain text
909 #: src/doc/rust.md:2137
910 #, fuzzy
911 #| msgid "## Structs"
912 msgid "## Statements"
913 msgstr "## 構造体"
914
915 #. type: Plain text
916 #: src/doc/rust.md:2146
917 #, fuzzy
918 #| msgid "## Declaring and implementing traits"
919 msgid "### Declaration statements"
920 msgstr "## トレイトの宣言と実装"
921
922 #. type: Plain text
923 #: src/doc/rust.md:2151
924 #, fuzzy
925 #| msgid "## Operators"
926 msgid "#### Item declarations"
927 msgstr "## 演算子"
928
929 #. type: Plain text
930 #: src/doc/rust.md:2163
931 #, fuzzy
932 #| msgid "## Using other crates"
933 msgid "#### Slot declarations"
934 msgstr "## 他のクレートの利用"
935
936 #. type: Plain text
937 #: src/doc/rust.md:2176
938 #, fuzzy
939 #| msgid "## Expressions and semicolons"
940 msgid "### Expression statements"
941 msgstr "## 式とセミコロン"
942
943 #. type: Plain text
944 #: src/doc/rust.md:2183
945 #, fuzzy
946 #| msgid "## Expressions and semicolons"
947 msgid "## Expressions"
948 msgstr "## 式とセミコロン"
949
950 #. type: Plain text
951 #: src/doc/rust.md:2223
952 #, fuzzy
953 #| msgid "# Closures"
954 msgid "#### Moved and copied types"
955 msgstr "# クロージャ"
956
957 #. type: Plain text
958 #: src/doc/rust.md:2233
959 #, fuzzy
960 #| msgid "## Syntax extensions"
961 msgid "### Literal expressions"
962 msgstr "## 構文拡張"
963
964 #. type: Plain text
965 #: src/doc/rust.md:2246
966 #, fuzzy
967 #| msgid "## Syntax extensions"
968 msgid "### Path expressions"
969 msgstr "## 構文拡張"
970
971 #. type: Plain text
972 #: src/doc/rust.md:2251
973 #, fuzzy
974 #| msgid "## Tuples"
975 msgid "### Tuple expressions"
976 msgstr "## タプル"
977
978 #. type: Plain text
979 #: src/doc/rust.md:2263
980 #, fuzzy
981 #| msgid "## Syntax extensions"
982 msgid "### Structure expressions"
983 msgstr "## 構文拡張"
984
985 #. type: Plain text
986 #: src/doc/rust.md:2288
987 #, fuzzy
988 #| msgid "## Syntax extensions"
989 msgid "The following are examples of structure expressions:"
990 msgstr "## 構文拡張"
991
992 #. type: Plain text
993 #: src/doc/rust.md:2315
994 #, fuzzy
995 #| msgid ""
996 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
997 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
998 msgid ""
999 "~~~~ # struct Point3d { x: int, y: int, z: int } let base = Point3d {x: 1, "
1000 "y: 2, z: 3}; Point3d {y: 0, z: 10, .. base}; ~~~~"
1001 msgstr ""
1002 "~~~\n"
1003 "# struct Point { x: f64, y: f64 }\n"
1004 "let point = &@~Point { x: 10f, y: 20f };\n"
1005 "println(fmt!(\"%f\", point.x));\n"
1006 "~~~"
1007
1008 #. type: Plain text
1009 #: src/doc/rust.md:2317
1010 #, fuzzy
1011 #| msgid "## Conventions"
1012 msgid "### Block expressions"
1013 msgstr "## 本書の表記について"
1014
1015 #. type: Plain text
1016 #: src/doc/rust.md:2335
1017 #, fuzzy
1018 #| msgid "## Syntax extensions"
1019 msgid "### Method-call expressions"
1020 msgstr "## 構文拡張"
1021
1022 #. type: Plain text
1023 #: src/doc/rust.md:2346
1024 #, fuzzy
1025 #| msgid "## Operators"
1026 msgid "### Field expressions"
1027 msgstr "## 演算子"
1028
1029 #. type: Plain text
1030 #: src/doc/rust.md:2367
1031 #, fuzzy
1032 #| msgid "## Syntax extensions"
1033 msgid "### Vector expressions"
1034 msgstr "## 構文拡張"
1035
1036 #. type: Plain text
1037 #: src/doc/rust.md:2389
1038 #, fuzzy
1039 #| msgid "## Syntax extensions"
1040 msgid "### Index expressions"
1041 msgstr "## 構文拡張"
1042
1043 #. type: Plain text
1044 #: src/doc/rust.md:2405
1045 #, fuzzy
1046 #| msgid "~~~~ use std::task::spawn;"
1047 msgid "~~~~ {.ignore} # use std::task; # do task::spawn {"
1048 msgstr ""
1049 "~~~~\n"
1050 "use std::task::spawn;"
1051
1052 #. type: Plain text
1053 #: src/doc/rust.md:2413
1054 #, fuzzy
1055 #| msgid "## Using other crates"
1056 msgid "### Unary operator expressions"
1057 msgstr "## 他のクレートの利用"
1058
1059 #. type: Plain text
1060 #: src/doc/rust.md:2438
1061 #, fuzzy
1062 #| msgid "## Using other crates"
1063 msgid "### Binary operator expressions"
1064 msgstr "## 他のクレートの利用"
1065
1066 #. type: Plain text
1067 #: src/doc/rust.md:2447
1068 #, fuzzy
1069 #| msgid "## Operators"
1070 msgid "#### Arithmetic operators"
1071 msgstr "## 演算子"
1072
1073 #. type: Plain text
1074 #: src/doc/rust.md:2470
1075 #, fuzzy
1076 #| msgid "## Operators"
1077 msgid "#### Bitwise operators"
1078 msgstr "## 演算子"
1079
1080 #. type: Plain text
1081 #: src/doc/rust.md:2493
1082 #, fuzzy
1083 #| msgid "# Control structures"
1084 msgid "#### Lazy boolean operators"
1085 msgstr "# 制御構造"
1086
1087 #. type: Plain text
1088 #: src/doc/rust.md:2502
1089 #, fuzzy
1090 #| msgid "# Control structures"
1091 msgid "#### Comparison operators"
1092 msgstr "# 制御構造"
1093
1094 #. type: Plain text
1095 #: src/doc/rust.md:2529
1096 #, fuzzy
1097 #| msgid "## Tuple structs"
1098 msgid "#### Type cast expressions"
1099 msgstr "## タプル構造体"
1100
1101 #. type: Plain text
1102 #: src/doc/rust.md:2540
1103 #, fuzzy
1104 #| msgid "## Syntax extensions"
1105 msgid "An example of an `as` expression:"
1106 msgstr "## 構文拡張"
1107
1108 #. type: Plain text
1109 #: src/doc/rust.md:2553
1110 #, fuzzy
1111 #| msgid "## Operators"
1112 msgid "#### Assignment expressions"
1113 msgstr "## 演算子"
1114
1115 #. type: Plain text
1116 #: src/doc/rust.md:2562
1117 #, fuzzy
1118 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1119 msgid "~~~~ # let mut x = 0; # let y = 0;"
1120 msgstr ""
1121 "~~~~\n"
1122 " let hi = \"hi\";\n"
1123 " let mut count = 0;"
1124
1125 #. type: Plain text
1126 #: src/doc/rust.md:2567
1127 #, fuzzy
1128 #| msgid "# Control structures"
1129 msgid "#### Compound assignment expressions"
1130 msgstr "# 制御構造"
1131
1132 #. type: Plain text
1133 #: src/doc/rust.md:2576
1134 #, fuzzy
1135 #| msgid "## Operators"
1136 msgid "#### Operator precedence"
1137 msgstr "## 演算子"
1138
1139 #. type: Plain text
1140 #: src/doc/rust.md:2599
1141 #, fuzzy
1142 #| msgid "## Tuples"
1143 msgid "### Grouped expressions"
1144 msgstr "## タプル"
1145
1146 #. type: Plain text
1147 #: src/doc/rust.md:2609
1148 #, fuzzy
1149 #| msgid "## A minimal example"
1150 msgid "An example of a parenthesized expression:"
1151 msgstr "## 最小限の例"
1152
1153 #. type: Plain text
1154 #: src/doc/rust.md:2613
1155 #, fuzzy
1156 #| msgid "~~~~ # let mystery_object = ();"
1157 msgid "~~~~ let x = (2 + 3) * 4; ~~~~"
1158 msgstr ""
1159 "~~~~\n"
1160 "# let mystery_object = ();"
1161
1162 #. type: Plain text
1163 #: src/doc/rust.md:2616
1164 #, fuzzy
1165 #| msgid "## Syntax extensions"
1166 msgid "### Call expressions"
1167 msgstr "## 構文拡張"
1168
1169 #. type: Plain text
1170 #: src/doc/rust.md:2629
1171 #, fuzzy
1172 #| msgid "## Syntax extensions"
1173 msgid "Some examples of call expressions:"
1174 msgstr "## 構文拡張"
1175
1176 #. type: Plain text
1177 #: src/doc/rust.md:2633
1178 #, fuzzy
1179 #| msgid ""
1180 #| "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, "
1181 #| "b: int, x: int) -> ()  { a * x + b; }"
1182 msgid ""
1183 "~~~~ # use std::from_str::FromStr; # fn add(x: int, y: int) -> int { 0 }"
1184 msgstr ""
1185 "~~~~\n"
1186 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
1187 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
1188
1189 #. type: Plain text
1190 #: src/doc/rust.md:2637
1191 #, fuzzy
1192 #| msgid ""
1193 #| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
1194 msgid ""
1195 "let x: int = add(1, 2); let pi: Option<f32> = FromStr::from_str(\"3.14\"); "
1196 "~~~~"
1197 msgstr ""
1198 "~~~~\n"
1199 "let x: f64 = 4.0;\n"
1200 "let y: uint = x as uint;\n"
1201 "assert!(y == 4u);\n"
1202 "~~~~"
1203
1204 #. type: Plain text
1205 #: src/doc/rust.md:2639
1206 #, fuzzy
1207 #| msgid "## Syntax extensions"
1208 msgid "### Lambda expressions"
1209 msgstr "## 構文拡張"
1210
1211 #. type: Plain text
1212 #: src/doc/rust.md:2677
1213 #, fuzzy, no-wrap
1214 #| msgid "~~~~ {.ignore} # struct Point { x: f64, y: f64 } let mut mypoint = Point { x: 1.0, y: 1.0 }; let origin = Point { x: 0.0, y: 0.0 };"
1215 msgid ""
1216 "~~~~\n"
1217 "fn ten_times(f: |int|) {\n"
1218 "    let mut i = 0;\n"
1219 "    while i < 10 {\n"
1220 "        f(i);\n"
1221 "        i += 1;\n"
1222 "    }\n"
1223 "}\n"
1224 msgstr ""
1225 "~~~~ {.ignore}\n"
1226 "# struct Point { x: f64, y: f64 }\n"
1227 "let mut mypoint = Point { x: 1.0, y: 1.0 };\n"
1228 "let origin = Point { x: 0.0, y: 0.0 };"
1229
1230 #. type: Plain text
1231 #: src/doc/rust.md:2682
1232 #, fuzzy
1233 #| msgid "## Loops"
1234 msgid "### While loops"
1235 msgstr "## ループ"
1236
1237 #. type: Plain text
1238 #: src/doc/rust.md:2693
1239 #, fuzzy
1240 #| msgid "## A minimal example"
1241 msgid "An example:"
1242 msgstr "## 最小限の例"
1243
1244 #. type: Plain text
1245 #: src/doc/rust.md:2696
1246 #, fuzzy
1247 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1248 msgid "~~~~ let mut i = 0;"
1249 msgstr ""
1250 "~~~~\n"
1251 " let hi = \"hi\";\n"
1252 " let mut count = 0;"
1253
1254 #. type: Plain text
1255 #: src/doc/rust.md:2702
1256 #, fuzzy, no-wrap
1257 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1258 msgid ""
1259 "while i < 10 {\n"
1260 "    println!(\"hello\");\n"
1261 "    i = i + 1;\n"
1262 "}\n"
1263 "~~~~\n"
1264 msgstr ""
1265 "~~~~ {.ignore}\n"
1266 "// main.rs\n"
1267 "extern crate world;\n"
1268 "fn main() { println(~\"hello \" + world::explore()); }\n"
1269 "~~~~"
1270
1271 #. type: Plain text
1272 #: src/doc/rust.md:2704
1273 #, fuzzy
1274 #| msgid "## Loops"
1275 msgid "### Infinite loops"
1276 msgstr "## ループ"
1277
1278 #. type: Plain text
1279 #: src/doc/rust.md:2719
1280 #, fuzzy
1281 #| msgid "## Syntax extensions"
1282 msgid "### Break expressions"
1283 msgstr "## 構文拡張"
1284
1285 #. type: Plain text
1286 #: src/doc/rust.md:2732
1287 #, fuzzy
1288 #| msgid "# Control structures"
1289 msgid "### Continue expressions"
1290 msgstr "# 制御構造"
1291
1292 #. type: Plain text
1293 #: src/doc/rust.md:2751
1294 #, fuzzy
1295 #| msgid "## Freezing"
1296 msgid "### For expressions"
1297 msgstr "## 凍結"
1298
1299 #. type: Plain text
1300 #: src/doc/rust.md:2760
1301 #, fuzzy
1302 #| msgid "## A minimal example"
1303 msgid "An example of a for loop over the contents of a vector:"
1304 msgstr "## 最小限の例"
1305
1306 #. type: Plain text
1307 #: src/doc/rust.md:2774
1308 #, fuzzy, no-wrap
1309 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1310 msgid ""
1311 "for e in v.iter() {\n"
1312 "    bar(*e);\n"
1313 "}\n"
1314 "~~~~\n"
1315 msgstr ""
1316 "~~~~ {.ignore}\n"
1317 "// main.rs\n"
1318 "extern crate world;\n"
1319 "fn main() { println(~\"hello \" + world::explore()); }\n"
1320 "~~~~"
1321
1322 #. type: Plain text
1323 #: src/doc/rust.md:2776
1324 #, fuzzy
1325 #| msgid "## A minimal example"
1326 msgid "An example of a for loop over a series of integers:"
1327 msgstr "## 最小限の例"
1328
1329 #. type: Plain text
1330 #: src/doc/rust.md:2785
1331 #, fuzzy
1332 #| msgid "## Syntax extensions"
1333 msgid "### If expressions"
1334 msgstr "## 構文拡張"
1335
1336 #. type: Plain text
1337 #: src/doc/rust.md:2806
1338 #, fuzzy
1339 #| msgid "## Syntax extensions"
1340 msgid "### Match expressions"
1341 msgstr "## 構文拡張"
1342
1343 #. type: Plain text
1344 #: src/doc/rust.md:2885
1345 #, fuzzy
1346 #| msgid "## Syntax extensions"
1347 msgid "An example of a `match` expression:"
1348 msgstr "## 構文拡張"
1349
1350 #. type: Plain text
1351 #: src/doc/rust.md:2935
1352 #, fuzzy, no-wrap
1353 #| msgid "~~~~ {.ignore} # struct Point { x: f64, y: f64 } let mut mypoint = Point { x: 1.0, y: 1.0 }; let origin = Point { x: 0.0, y: 0.0 };"
1354 msgid ""
1355 "fn main() {\n"
1356 "    let a = Cons(6, ~Cons(7, ~Cons(42, ~Nil)));\n"
1357 "    assert!(is_sorted(&a));\n"
1358 "}\n"
1359 msgstr ""
1360 "~~~~ {.ignore}\n"
1361 "# struct Point { x: f64, y: f64 }\n"
1362 "let mut mypoint = Point { x: 1.0, y: 1.0 };\n"
1363 "let origin = Point { x: 0.0, y: 0.0 };"
1364
1365 #. type: Plain text
1366 #: src/doc/rust.md:2967
1367 #, fuzzy
1368 #| msgid "~~~~ # let mystery_object = ();"
1369 msgid "~~~~ # let x = 2;"
1370 msgstr ""
1371 "~~~~\n"
1372 "# let mystery_object = ();"
1373
1374 #. type: Plain text
1375 #: src/doc/rust.md:2997
1376 #, fuzzy
1377 #| msgid "## Syntax extensions"
1378 msgid "### Return expressions"
1379 msgstr "## 構文拡張"
1380
1381 #. type: Plain text
1382 #: src/doc/rust.md:3008
1383 #, fuzzy
1384 #| msgid "## A minimal example"
1385 msgid "An example of a `return` expression:"
1386 msgstr "## 最小限の例"
1387
1388 #. type: Plain text
1389 #: src/doc/rust.md:3017
1390 #, fuzzy, no-wrap
1391 #| msgid "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
1392 msgid ""
1393 "~~~~\n"
1394 "fn max(a: int, b: int) -> int {\n"
1395 "   if a > b {\n"
1396 "      return a;\n"
1397 "   }\n"
1398 "   return b;\n"
1399 "}\n"
1400 "~~~~\n"
1401 msgstr ""
1402 "~~~~\n"
1403 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
1404 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
1405
1406 #. type: Plain text
1407 #: src/doc/rust.md:3021
1408 #, fuzzy
1409 #| msgid "## Tuples"
1410 msgid "## Types"
1411 msgstr "## タプル"
1412
1413 #. type: Plain text
1414 #: src/doc/rust.md:3030
1415 #, fuzzy
1416 #| msgid "## Primitive types and literals"
1417 msgid "### Primitive types"
1418 msgstr "## プリミティブ型とリテラル"
1419
1420 #. type: Plain text
1421 #: src/doc/rust.md:3032
1422 #, fuzzy
1423 #| msgid "## Primitive types and literals"
1424 msgid "The primitive types are the following:"
1425 msgstr "## プリミティブ型とリテラル"
1426
1427 #. type: Bullet: '* '
1428 #: src/doc/rust.md:3038
1429 #, fuzzy
1430 #| msgid "# Closures"
1431 msgid "The machine types."
1432 msgstr "# クロージャ"
1433
1434 #. type: Bullet: '* '
1435 #: src/doc/rust.md:3038
1436 #, fuzzy
1437 #| msgid "# Closures"
1438 msgid "The machine-dependent integer and floating-point types."
1439 msgstr "# クロージャ"
1440
1441 #. type: Plain text
1442 #: src/doc/rust.md:3040
1443 #, fuzzy
1444 #| msgid "# Closures"
1445 msgid "#### Machine types"
1446 msgstr "# クロージャ"
1447
1448 #. type: Plain text
1449 #: src/doc/rust.md:3042
1450 #, fuzzy
1451 #| msgid "## Primitive types and literals"
1452 msgid "The machine types are the following:"
1453 msgstr "## プリミティブ型とリテラル"
1454
1455 #. type: Plain text
1456 #: src/doc/rust.md:3056
1457 #, fuzzy
1458 #| msgid "# Closures"
1459 msgid "#### Machine-dependent integer types"
1460 msgstr "# クロージャ"
1461
1462 #. type: Plain text
1463 #: src/doc/rust.md:3068
1464 #, fuzzy
1465 #| msgid "# Closures"
1466 msgid "### Textual types"
1467 msgstr "# クロージャ"
1468
1469 #. type: Plain text
1470 #: src/doc/rust.md:3081
1471 #, fuzzy
1472 #| msgid "## Tuples"
1473 msgid "### Tuple types"
1474 msgstr "## タプル"
1475
1476 #. type: Plain text
1477 #: src/doc/rust.md:3096
1478 #, fuzzy
1479 #| msgid "# Vectors and strings"
1480 msgid "An example of a tuple type and its use:"
1481 msgstr "# ベクタと文字列"
1482
1483 #. type: Plain text
1484 #: src/doc/rust.md:3105
1485 #, fuzzy
1486 #| msgid "# Closures"
1487 msgid "### Vector types"
1488 msgstr "# クロージャ"
1489
1490 #. type: Plain text
1491 #: src/doc/rust.md:3123
1492 #, fuzzy
1493 #| msgid "## A minimal example"
1494 msgid "An example of a vector type and its use:"
1495 msgstr "## 最小限の例"
1496
1497 #. type: Plain text
1498 #: src/doc/rust.md:3129
1499 #, fuzzy
1500 #| msgid ""
1501 #| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
1502 msgid ""
1503 "~~~~ let v: &[int] = &[7, 5, 3]; let i: int = v[2]; assert!(i == 3); ~~~~"
1504 msgstr ""
1505 "~~~~\n"
1506 "let x: f64 = 4.0;\n"
1507 "let y: uint = x as uint;\n"
1508 "assert!(y == 4u);\n"
1509 "~~~~"
1510
1511 #. type: Plain text
1512 #: src/doc/rust.md:3134
1513 #, fuzzy
1514 #| msgid "# Closures"
1515 msgid "### Structure types"
1516 msgstr "# クロージャ"
1517
1518 #. type: Plain text
1519 #: src/doc/rust.md:3156
1520 #, fuzzy
1521 #| msgid "# Closures"
1522 msgid "### Enumerated types"
1523 msgstr "# クロージャ"
1524
1525 #. type: Plain text
1526 #: src/doc/rust.md:3174
1527 #, fuzzy
1528 #| msgid "# Closures"
1529 msgid "### Recursive types"
1530 msgstr "# クロージャ"
1531
1532 #. type: Plain text
1533 #: src/doc/rust.md:3190
1534 #, fuzzy
1535 #| msgid "# Vectors and strings"
1536 msgid "An example of a *recursive* type and its use:"
1537 msgstr "# ベクタと文字列"
1538
1539 #. type: Plain text
1540 #: src/doc/rust.md:3201
1541 #, fuzzy
1542 #| msgid "# Closures"
1543 msgid "### Pointer types"
1544 msgstr "# クロージャ"
1545
1546 #. type: Plain text
1547 #: src/doc/rust.md:3249
1548 #, fuzzy
1549 #| msgid "# Functions"
1550 msgid "### Function types"
1551 msgstr "# 関数"
1552
1553 #. type: Plain text
1554 #: src/doc/rust.md:3255
1555 #, fuzzy
1556 #| msgid "## A minimal example"
1557 msgid "An example of a `fn` type:"
1558 msgstr "## 最小限の例"
1559
1560 #. type: Plain text
1561 #: src/doc/rust.md:3260
1562 #, fuzzy, no-wrap
1563 #| msgid "~~~~ fn line(a: int, b: int, x: int) -> int { a * x + b } fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
1564 msgid ""
1565 "~~~~\n"
1566 "fn add(x: int, y: int) -> int {\n"
1567 "  return x + y;\n"
1568 "}\n"
1569 msgstr ""
1570 "~~~~\n"
1571 "fn line(a: int, b: int, x: int) -> int { a * x + b }\n"
1572 "fn oops(a: int, b: int, x: int) -> ()  { a * x + b; }"
1573
1574 #. type: Plain text
1575 #: src/doc/rust.md:3262
1576 #, fuzzy
1577 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1578 msgid "let mut x = add(5,7);"
1579 msgstr ""
1580 "~~~~\n"
1581 " let hi = \"hi\";\n"
1582 " let mut count = 0;"
1583
1584 #. type: Plain text
1585 #: src/doc/rust.md:3269
1586 #, fuzzy
1587 #| msgid "# Closures"
1588 msgid "### Closure types"
1589 msgstr "# クロージャ"
1590
1591 #. type: Plain text
1592 #: src/doc/rust.md:3274
1593 #, fuzzy
1594 #| msgid "## A minimal example"
1595 msgid "An example of creating and calling a closure:"
1596 msgstr "## 最小限の例"
1597
1598 #. type: Plain text
1599 #: src/doc/rust.md:3279
1600 #, fuzzy
1601 #| msgid ""
1602 #| "let captured_var = 20; let closure = |arg| println(fmt!(\"captured_var="
1603 #| "%d, arg=%d\", captured_var, arg));"
1604 msgid "let closure_no_args = || println!(\"captured_var={}\", captured_var);"
1605 msgstr ""
1606 "let captured_var = 20;\n"
1607 "let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, "
1608 "arg));"
1609
1610 #. type: Plain text
1611 #: src/doc/rust.md:3284
1612 #, fuzzy, no-wrap
1613 #| msgid "let captured_var = 20; let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, arg));"
1614 msgid ""
1615 "let closure_args = |arg: int| -> int {\n"
1616 "  println!(\"captured_var={}, arg={}\", captured_var, arg);\n"
1617 "  arg // Note lack of semicolon after 'arg'\n"
1618 "};\n"
1619 msgstr ""
1620 "let captured_var = 20;\n"
1621 "let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, arg));"
1622
1623 #. type: Plain text
1624 #: src/doc/rust.md:3295
1625 #, fuzzy
1626 #| msgid "# Closures"
1627 msgid "### Object types"
1628 msgstr "# クロージャ"
1629
1630 #. type: Plain text
1631 #: src/doc/rust.md:3309
1632 #, fuzzy
1633 #| msgid "## A minimal example"
1634 msgid "An example of an object type:"
1635 msgstr "## 最小限の例"
1636
1637 #. type: Plain text
1638 #: src/doc/rust.md:3314
1639 #, fuzzy, no-wrap
1640 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1641 msgid ""
1642 "~~~~\n"
1643 "trait Printable {\n"
1644 "  fn to_string(&self) -> StrBuf;\n"
1645 "}\n"
1646 msgstr ""
1647 "~~~~ {.ignore}\n"
1648 "// main.rs\n"
1649 "extern crate world;\n"
1650 "fn main() { println(~\"hello \" + world::explore()); }\n"
1651 "~~~~"
1652
1653 #. type: Plain text
1654 #: src/doc/rust.md:3318
1655 #, fuzzy, no-wrap
1656 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1657 msgid ""
1658 "impl Printable for int {\n"
1659 "  fn to_string(&self) -> StrBuf { self.to_str() }\n"
1660 "}\n"
1661 msgstr ""
1662 "~~~~ {.ignore}\n"
1663 "// main.rs\n"
1664 "extern crate world;\n"
1665 "fn main() { println(~\"hello \" + world::explore()); }\n"
1666 "~~~~"
1667
1668 #. type: Plain text
1669 #: src/doc/rust.md:3327
1670 #, fuzzy, no-wrap
1671 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1672 msgid ""
1673 "fn main() {\n"
1674 "   print(@10 as @Printable);\n"
1675 "}\n"
1676 "~~~~\n"
1677 msgstr ""
1678 "~~~~ {.ignore}\n"
1679 "// main.rs\n"
1680 "extern crate world;\n"
1681 "fn main() { println(~\"hello \" + world::explore()); }\n"
1682 "~~~~"
1683
1684 #. type: Plain text
1685 #: src/doc/rust.md:3332
1686 #, fuzzy
1687 #| msgid "## Tuples"
1688 msgid "### Type parameters"
1689 msgstr "## タプル"
1690
1691 #. type: Plain text
1692 #: src/doc/rust.md:3350
1693 #, fuzzy
1694 #| msgid "# Closures"
1695 msgid "### Self types"
1696 msgstr "# クロージャ"
1697
1698 #. type: Plain text
1699 #: src/doc/rust.md:3359
1700 #, fuzzy, no-wrap
1701 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1702 msgid ""
1703 "~~~~\n"
1704 "trait Printable {\n"
1705 "  fn make_string(&self) -> StrBuf;\n"
1706 "}\n"
1707 msgstr ""
1708 "~~~~ {.ignore}\n"
1709 "// main.rs\n"
1710 "extern crate world;\n"
1711 "fn main() { println(~\"hello \" + world::explore()); }\n"
1712 "~~~~"
1713
1714 #. type: Plain text
1715 #: src/doc/rust.md:3366
1716 #, fuzzy, no-wrap
1717 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1718 msgid ""
1719 "impl Printable for StrBuf {\n"
1720 "    fn make_string(&self) -> StrBuf {\n"
1721 "        (*self).clone()\n"
1722 "    }\n"
1723 "}\n"
1724 "~~~~\n"
1725 msgstr ""
1726 "~~~~ {.ignore}\n"
1727 "// main.rs\n"
1728 "extern crate world;\n"
1729 "fn main() { println(~\"hello \" + world::explore()); }\n"
1730 "~~~~"
1731
1732 #. type: Plain text
1733 #: src/doc/rust.md:3371
1734 #, fuzzy
1735 #| msgid "## Tuples"
1736 msgid "## Type kinds"
1737 msgstr "## タプル"
1738
1739 #. type: Plain text
1740 #: src/doc/rust.md:3429
1741 #, fuzzy
1742 #| msgid "## Managed boxes"
1743 msgid "# Memory and concurrency models"
1744 msgstr "## マネージドボックス"
1745
1746 #. type: Plain text
1747 #: src/doc/rust.md:3441
1748 #, fuzzy
1749 #| msgid "## Managed boxes"
1750 msgid "## Memory model"
1751 msgstr "## マネージドボックス"
1752
1753 #. type: Plain text
1754 #: src/doc/rust.md:3450
1755 #, fuzzy
1756 #| msgid "# Introduction"
1757 msgid "### Memory allocation and lifetime"
1758 msgstr "# イントロダクション"
1759
1760 #. type: Plain text
1761 #: src/doc/rust.md:3468
1762 #, fuzzy
1763 #| msgid "# Ownership"
1764 msgid "### Memory ownership"
1765 msgstr "# 所有権"
1766
1767 #. type: Plain text
1768 #: src/doc/rust.md:3492
1769 #, fuzzy
1770 #| msgid "## Managed boxes"
1771 msgid "### Memory slots"
1772 msgstr "## マネージドボックス"
1773
1774 #. type: Plain text
1775 #: src/doc/rust.md:3525
1776 #, fuzzy
1777 #| msgid "## Managed boxes"
1778 msgid "### Memory boxes"
1779 msgstr "## マネージドボックス"
1780
1781 #. type: Plain text
1782 #: src/doc/rust.md:3547
1783 #, fuzzy
1784 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1785 msgid "~~~~ let x: @int = @10; let x: ~int = ~10; ~~~~"
1786 msgstr ""
1787 "~~~~\n"
1788 " let hi = \"hi\";\n"
1789 " let mut count = 0;"
1790
1791 #. type: Plain text
1792 #: src/doc/rust.md:3556
1793 #, fuzzy
1794 #| msgid ""
1795 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
1796 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
1797 msgid ""
1798 "~~~~ struct Foo { y: int } let x = @Foo{y: 10}; assert!(x.y == 10); ~~~~"
1799 msgstr ""
1800 "~~~\n"
1801 "# struct Point { x: f64, y: f64 }\n"
1802 "let point = &@~Point { x: 10f, y: 20f };\n"
1803 "println(fmt!(\"%f\", point.x));\n"
1804 "~~~"
1805
1806 #. type: Plain text
1807 #: src/doc/rust.md:3581
1808 #, fuzzy, no-wrap
1809 #| msgid "~~~~ {.ignore} # struct Point { x: f64, y: f64 } let mut mypoint = Point { x: 1.0, y: 1.0 }; let origin = Point { x: 0.0, y: 0.0 };"
1810 msgid ""
1811 "fn main() {\n"
1812 "    let x: @int = @10;\n"
1813 "    takes_boxed(x);\n"
1814 "    takes_unboxed(*x);\n"
1815 "}\n"
1816 "~~~~\n"
1817 msgstr ""
1818 "~~~~ {.ignore}\n"
1819 "# struct Point { x: f64, y: f64 }\n"
1820 "let mut mypoint = Point { x: 1.0, y: 1.0 };\n"
1821 "let origin = Point { x: 0.0, y: 0.0 };"
1822
1823 #. type: Plain text
1824 #: src/doc/rust.md:3583
1825 #, fuzzy
1826 #| msgid "## Traits"
1827 msgid "## Tasks"
1828 msgstr "## トレイト"
1829
1830 #. type: Plain text
1831 #: src/doc/rust.md:3608
1832 #, fuzzy
1833 #| msgid "## Conditionals"
1834 msgid "### Communication between tasks"
1835 msgstr "## 条件式"
1836
1837 #. type: Plain text
1838 #: src/doc/rust.md:3668
1839 #, fuzzy
1840 #| msgid "[Tasks and communication][tasks]"
1841 msgid "### Task scheduling"
1842 msgstr "[タスクと通信][tasks]"
1843
1844 #. type: Plain text
1845 #: src/doc/rust.md:3688
1846 #, fuzzy
1847 #| msgid "# Introduction"
1848 msgid "### Memory allocation"
1849 msgstr "# イントロダクション"
1850
1851 #. type: Plain text
1852 #: src/doc/rust.md:3700
1853 #, fuzzy
1854 #| msgid "# Closures"
1855 msgid "### Built in types"
1856 msgstr "# クロージャ"
1857
1858 #. type: Plain text
1859 #: src/doc/rust.md:3709
1860 #, fuzzy
1861 #| msgid "[Tasks and communication][tasks]"
1862 msgid "### Task scheduling and communication"
1863 msgstr "[タスクと通信][tasks]"
1864
1865 #. type: Plain text
1866 #: src/doc/rust.md:3717
1867 #, fuzzy
1868 #| msgid "## Freezing"
1869 msgid "### Linkage"
1870 msgstr "## 凍結"
1871
1872 #. type: Plain text
1873 #: src/doc/rust.md:3822
1874 #, fuzzy
1875 #| msgid "## Freezing"
1876 msgid "### Logging system"
1877 msgstr "## 凍結"
1878
1879 #. type: Plain text
1880 #: src/doc/rust.md:3860
1881 #, fuzzy
1882 #| msgid "## Conventions"
1883 msgid "#### Logging Expressions"
1884 msgstr "## 本書の表記について"
1885
1886 #. type: Plain text
1887 #: src/doc/rust.md:3889
1888 #, fuzzy
1889 msgid "## Influences"
1890 msgstr "# ポインタのデリファレンス"