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.
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"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "Plural-Forms: nplurals=1; plural=0;\n"
20 #: src/doc/complement-cheatsheet.md:115 src/doc/rust.md:3019
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"
35 #| msgid "% The Rust Language Tutorial"
36 msgid "% The Rust Reference Manual"
37 msgstr "% Rust 言語チュートリアル"
42 #| msgid "## Conventions"
49 #| msgid "# Introduction"
50 msgid "## Unicode productions"
56 #| msgid "## Using other crates"
57 msgid "## String table productions"
61 #: src/doc/rust.md:113
63 #| msgid "# Data structures"
64 msgid "# Lexical structure"
68 #: src/doc/rust.md:123
70 #| msgid "# Introduction"
71 msgid "## Special Unicode Productions"
75 #: src/doc/rust.md:128
77 #| msgid "## Operators"
78 msgid "### Identifiers"
82 #: src/doc/rust.md:141
84 #| msgid "## Using other crates"
85 msgid "### Delimiter-restricted productions"
89 #: src/doc/rust.md:152
91 #| msgid "## Conventions"
96 #: src/doc/rust.md:190
103 #: src/doc/rust.md:202
110 #: src/doc/rust.md:204
112 #| msgid "## Primitive types and literals"
113 msgid "The keywords are the following strings:"
114 msgstr "## プリミティブ型とリテラル"
117 #: src/doc/rust.md:226
119 #| msgid "## Operators"
124 #: src/doc/rust.md:238
126 #| msgid "# Vectors and strings"
127 msgid "#### Character and string literals"
131 #: src/doc/rust.md:307
133 #| msgid "# Vectors and strings"
134 msgid "Examples for string literals:"
138 #: src/doc/rust.md:320
140 #| msgid "# Control structures"
141 msgid "#### Number literals"
145 #: src/doc/rust.md:345
147 #| msgid "# Control structures"
148 msgid "##### Integer literals"
152 #: src/doc/rust.md:347
154 #| msgid "# Vectors and strings"
155 msgid "An _integer literal_ has one of four forms:"
159 #: src/doc/rust.md:375
161 #| msgid "# Vectors and strings"
162 msgid "Examples of integer literals of various forms:"
166 #: src/doc/rust.md:389
168 #| msgid "# Control structures"
169 msgid "##### Floating-point literals"
173 #: src/doc/rust.md:391
175 #| msgid "# Vectors and strings"
176 msgid "A _floating-point literal_ has one of two forms:"
180 #: src/doc/rust.md:404
182 #| msgid "# Vectors and strings"
183 msgid "Examples of floating-point literals of various forms:"
187 #: src/doc/rust.md:413
189 #| msgid "# Control structures"
190 msgid "##### Unit and boolean literals"
194 #: src/doc/rust.md:418
201 #: src/doc/rust.md:459
203 #| msgid "~~~~ {.ignore} let foo = 10;"
204 msgid "~~~~ {.ignore} x; x::y::z; ~~~~"
210 #: src/doc/rust.md:468
212 #| msgid "# Vectors and strings"
213 msgid "Two examples of paths with type arguments:"
217 #: src/doc/rust.md:479
219 #| msgid "## Syntax extensions"
220 msgid "# Syntax extensions"
224 #: src/doc/rust.md:497
226 #| msgid "## Syntax extensions"
231 #: src/doc/rust.md:525
233 #| msgid "## A minimal example"
234 msgid "### Macro By Example"
238 #: src/doc/rust.md:561
240 #| msgid "## Pattern matching"
241 msgid "### Parsing limitations"
245 #: src/doc/rust.md:580
247 #| msgid "# Modules and crates"
248 msgid "# Crates and source files"
249 msgstr "# モジュールとクレート"
252 #: src/doc/rust.md:627
254 #| msgid "// Turn on a warning #[warn(non_camel_case_types)]"
255 msgid "// Turn on a warning #![ warn(non_camel_case_types) ] ~~~~"
258 "#[warn(non_camel_case_types)]"
261 #: src/doc/rust.md:632
263 #| msgid "# Vectors and strings"
264 msgid "# Items and attributes"
268 #: src/doc/rust.md:637
270 #| msgid "## Operators"
275 #: src/doc/rust.md:674
278 msgid "### Type Parameters"
282 #: src/doc/rust.md:685
289 #: src/doc/rust.md:701
291 #| msgid "## A minimal example"
292 msgid "An example of a module:"
296 #: src/doc/rust.md:753
298 #| msgid "## Structs"
299 msgid "#### View items"
303 #: src/doc/rust.md:766
305 #| msgid "## Using other crates"
306 msgid "##### Extern mod declarations"
307 msgstr "## 他のクレートの利用"
310 #: src/doc/rust.md:786
312 #| msgid "## Using other crates"
313 msgid "Four examples of `extern crate` declarations:"
314 msgstr "## 他のクレートの利用"
317 #: src/doc/rust.md:789
319 #| msgid "~~~~ {.ignore} let foo = 10;"
320 msgid "~~~~ {.ignore} extern crate pcre;"
326 #: src/doc/rust.md:798
328 #| msgid "## Conventions"
329 msgid "##### Use declarations"
330 msgstr "## 本書の表記について"
333 #: src/doc/rust.md:826
335 #| msgid "## Using other crates"
336 msgid "An example of `use` declarations:"
337 msgstr "## 他のクレートの利用"
340 #: src/doc/rust.md:830
342 #| msgid "~~~~ use std::task::spawn;"
343 msgid "~~~~ use std::num::sin; use std::option::{Some, None};"
346 "use std::task::spawn;"
349 #: src/doc/rust.md:851
351 #| msgid "## A minimal example"
352 msgid "An example of re-exporting:"
356 #: src/doc/rust.md:875
358 #| msgid "## A minimal example"
359 msgid "An example of what will and will not work for `use` items:"
363 #: src/doc/rust.md:883
365 #| msgid "~~~~ {.ignore} let foo = 10;"
368 " extern crate extra;\n"
374 #: src/doc/rust.md:901
377 #| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
378 #| "\" + world::explore()); } ~~~~"
379 msgid "fn main() {} ~~~~"
383 "extern crate world;\n"
384 "fn main() { println(~\"hello \" + world::explore()); }\n"
388 #: src/doc/rust.md:903
390 #| msgid "# Functions"
391 msgid "### Functions"
395 #: src/doc/rust.md:920
397 #| msgid "## A minimal example"
398 msgid "An example of a function:"
402 #: src/doc/rust.md:926
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; }"
407 "fn add(x: int, y: int) -> int {\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; }"
417 #: src/doc/rust.md:933
419 #| msgid "~~~ fn first((value, _): (int, f64)) -> int { value } ~~~"
420 msgid "~~~~ fn first((value, _): (int, int)) -> int { value } ~~~~"
423 "fn first((value, _): (int, f64)) -> int { value }\n"
427 #: src/doc/rust.md:936
429 #| msgid "## Conventions"
430 msgid "#### Generic functions"
431 msgstr "## 本書の表記について"
434 #: src/doc/rust.md:974
436 #| msgid "~~~~ let square = |x: int| -> uint { (x * x) as uint }; ~~~~"
437 msgid "~~~~ fn id<T>(x: T) -> T { x } ~~~~"
440 "let square = |x: int| -> uint { (x * x) as uint };\n"
444 #: src/doc/rust.md:981
446 #| msgid "## Conventions"
447 msgid "#### Unsafety"
448 msgstr "## 本書の表記について"
450 #. type: Bullet: ' - '
451 #: src/doc/rust.md:988
453 #| msgid "# Dereferencing pointers"
454 msgid "Dereferencing a [raw pointer](#pointer-types)."
455 msgstr "# ポインタのデリファレンス"
458 #: src/doc/rust.md:990
460 #| msgid "## Conventions"
461 msgid "##### Unsafe functions"
462 msgstr "## 本書の表記について"
465 #: src/doc/rust.md:995
467 #| msgid "## Conventions"
468 msgid "##### Unsafe blocks"
469 msgstr "## 本書の表記について"
471 #. type: Bullet: '* '
472 #: src/doc/rust.md:1037
474 #| msgid "# Data structures"
478 #. type: Bullet: '* '
479 #: src/doc/rust.md:1037
481 #| msgid "# Dereferencing pointers"
482 msgid "Dereferencing a null/dangling raw pointer"
483 msgstr "# ポインタのデリファレンス"
486 #: src/doc/rust.md:1052
488 #| msgid "## Conventions"
489 msgid "#### Diverging functions"
490 msgstr "## 本書の表記について"
493 #: src/doc/rust.md:1088
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; }"
497 "fn f(i: int) -> int {\n"
502 " my_err(\"Bad number!\");\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; }"
512 #: src/doc/rust.md:1099
514 #| msgid "## Conventions"
515 msgid "#### Extern functions"
516 msgstr "## 本書の表記について"
519 #: src/doc/rust.md:1128
521 #| msgid "## Conventions"
522 msgid "### Type definitions"
523 msgstr "## 本書の表記について"
525 #. type: Bullet: '* '
526 #: src/doc/rust.md:1138
528 #| msgid "# Closures"
529 msgid "Whether the value represents integral or floating-point information."
533 #: src/doc/rust.md:1143
535 #| msgid "## Structs"
536 msgid "### Structures"
540 #: src/doc/rust.md:1147
542 #| msgid "## A minimal example"
543 msgid "An example of a `struct` item and its use:"
547 #: src/doc/rust.md:1153
550 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
551 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
553 "~~~~ struct Point {x: int, y: int} let p = Point {x: 10, y: 11}; let px: int "
557 "# struct Point { x: f64, y: f64 }\n"
558 "let point = &@~Point { x: 10f, y: 20f };\n"
559 "println(fmt!(\"%f\", point.x));\n"
563 #: src/doc/rust.md:1162
566 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
567 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
569 "~~~~ struct Point(int, int); let p = Point(10, 11); let px: int = match p "
570 "{ Point(x, _) => x }; ~~~~"
573 "# struct Point { x: f64, y: f64 }\n"
574 "let point = &@~Point { x: 10f, y: 20f };\n"
575 "println(fmt!(\"%f\", point.x));\n"
579 #: src/doc/rust.md:1173
582 msgid "### Enumerations"
586 #: src/doc/rust.md:1180
588 #| msgid "## A minimal example"
589 msgid "An example of an `enum` item and its use:"
593 #: src/doc/rust.md:1207
595 #| msgid "## Structs"
596 msgid "### Static items"
600 #: src/doc/rust.md:1243
602 #| msgid "# Move semantics"
603 msgid "#### Mutable statics"
604 msgstr "# ムーブセマンティクス"
607 #: src/doc/rust.md:1257
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 }"
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; }"
619 #: src/doc/rust.md:1277
626 #: src/doc/rust.md:1366
628 #| msgid "Enum variants may also be structs. For example:"
629 msgid "Traits may inherit from other traits. For example, in"
630 msgstr "以下の例のように、列挙型バリアントを構造体にすることも可能です。"
633 #: src/doc/rust.md:1371
636 #| "~~~~ trait Shape { fn area(&self) -> f64; } trait Circle : Shape { fn "
637 #| "radius(&self) -> f64; } ~~~~"
639 "~~~~ trait Shape { fn area() -> f64; } trait Circle : Shape { fn radius() -> "
643 "trait Shape { fn area(&self) -> f64; }\n"
644 "trait Circle : Shape { fn radius(&self) -> f64; }\n"
648 #: src/doc/rust.md:1380
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`:"
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`:"
659 "型パラメータを持つ関数では、サブトレイトの境界型パラメータの値によりスーパー"
660 "トレイトのメソッドを呼び出すことになります。前の例の `trait Circle : Shape` "
664 #: src/doc/rust.md:1389
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"
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"
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"
695 #: src/doc/rust.md:1391 src/doc/tutorial.md:2495
696 msgid "Likewise, supertrait methods may also be called on trait objects."
698 "同様に、スーパートレイトのメソッドは、トレイトオブジェクトについても呼び出す"
702 #: src/doc/rust.md:1398
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) } }"
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 } } # "
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() / "
725 "# impl Shape for CircleStruct { fn area(&self) -> f64 { pi * square(self."
729 #: src/doc/rust.md:1402
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(); ~~~"
736 "let mycircle: Circle = @mycircle as @Circle; let nonsense = mycircle."
737 "radius() * mycircle.area(); ~~~~"
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"
745 #: src/doc/rust.md:1404
747 #| msgid "# Introduction"
748 msgid "### Implementations"
752 #: src/doc/rust.md:1420
754 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
763 "extern crate world;\n"
764 "fn main() { println(~\"hello \" + world::explore()); }\n"
768 #: src/doc/rust.md:1458
770 #| msgid "## Conventions"
771 msgid "### External blocks"
772 msgstr "## 本書の表記について"
775 #: src/doc/rust.md:1644 src/doc/rust.md:1665
778 #| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
779 #| "\" + world::explore()); } ~~~~"
780 msgid "# fn main() {} ~~~~"
784 "extern crate world;\n"
785 "fn main() { println(~\"hello \" + world::explore()); }\n"
789 #: src/doc/rust.md:1650
791 #| msgid "# Dereferencing pointers"
792 msgid "### Re-exporting and Visibility"
793 msgstr "# ポインタのデリファレンス"
796 #: src/doc/rust.md:1674
798 #| msgid "## Managed closures"
799 msgid "### Glob imports and Visibility"
800 msgstr "## マネージドクロージャ"
803 #: src/doc/rust.md:1684
805 #| msgid "# Vectors and strings"
806 msgid "## Attributes"
810 #: src/doc/rust.md:1706
812 #| msgid "# Vectors and strings"
813 msgid "An example of attributes:"
817 #: src/doc/rust.md:1754
819 #| msgid "# Vectors and strings"
820 msgid "### Lint check attributes"
824 #: src/doc/rust.md:1823
826 #| msgid "## Structs"
827 msgid "### Language items"
831 #: src/doc/rust.md:1844
838 #: src/doc/rust.md:1885
840 #| msgid "## Operators"
841 msgid "#### Operations"
845 #: src/doc/rust.md:1920
847 #| msgid "# Vectors and strings"
848 msgid "### Inline attributes"
852 #: src/doc/rust.md:1933
854 #| msgid "Our example crate declared this set of `link` attributes:"
855 msgid "There are three different types of inline attributes:"
857 "先ほどのクレートの例では、 `link` 属性は以下のように宣言されていました。"
860 #: src/doc/rust.md:1939
862 #| msgid "## Freezing"
867 #: src/doc/rust.md:1953
869 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
872 "#[deriving(Eq, Clone)]\n"
881 "extern crate world;\n"
882 "fn main() { println(~\"hello \" + world::explore()); }\n"
886 #: src/doc/rust.md:2008
888 #| msgid "~~~~ use std::task::spawn;"
889 msgid "~~~~ {.ignore} #![warn(unstable)]"
892 "use std::task::spawn;"
895 #: src/doc/rust.md:2037
898 msgid "### Compiler Features"
902 #: src/doc/rust.md:2125
904 #| msgid "## Syntax extensions"
905 msgid "# Statements and expressions"
909 #: src/doc/rust.md:2137
911 #| msgid "## Structs"
912 msgid "## Statements"
916 #: src/doc/rust.md:2146
918 #| msgid "## Declaring and implementing traits"
919 msgid "### Declaration statements"
920 msgstr "## トレイトの宣言と実装"
923 #: src/doc/rust.md:2151
925 #| msgid "## Operators"
926 msgid "#### Item declarations"
930 #: src/doc/rust.md:2163
932 #| msgid "## Using other crates"
933 msgid "#### Slot declarations"
934 msgstr "## 他のクレートの利用"
937 #: src/doc/rust.md:2176
939 #| msgid "## Expressions and semicolons"
940 msgid "### Expression statements"
944 #: src/doc/rust.md:2183
946 #| msgid "## Expressions and semicolons"
947 msgid "## Expressions"
951 #: src/doc/rust.md:2223
953 #| msgid "# Closures"
954 msgid "#### Moved and copied types"
958 #: src/doc/rust.md:2233
960 #| msgid "## Syntax extensions"
961 msgid "### Literal expressions"
965 #: src/doc/rust.md:2246
967 #| msgid "## Syntax extensions"
968 msgid "### Path expressions"
972 #: src/doc/rust.md:2251
975 msgid "### Tuple expressions"
979 #: src/doc/rust.md:2263
981 #| msgid "## Syntax extensions"
982 msgid "### Structure expressions"
986 #: src/doc/rust.md:2288
988 #| msgid "## Syntax extensions"
989 msgid "The following are examples of structure expressions:"
993 #: src/doc/rust.md:2315
996 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
997 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
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}; ~~~~"
1003 "# struct Point { x: f64, y: f64 }\n"
1004 "let point = &@~Point { x: 10f, y: 20f };\n"
1005 "println(fmt!(\"%f\", point.x));\n"
1009 #: src/doc/rust.md:2317
1011 #| msgid "## Conventions"
1012 msgid "### Block expressions"
1013 msgstr "## 本書の表記について"
1016 #: src/doc/rust.md:2335
1018 #| msgid "## Syntax extensions"
1019 msgid "### Method-call expressions"
1023 #: src/doc/rust.md:2346
1025 #| msgid "## Operators"
1026 msgid "### Field expressions"
1030 #: src/doc/rust.md:2367
1032 #| msgid "## Syntax extensions"
1033 msgid "### Vector expressions"
1037 #: src/doc/rust.md:2389
1039 #| msgid "## Syntax extensions"
1040 msgid "### Index expressions"
1044 #: src/doc/rust.md:2405
1046 #| msgid "~~~~ use std::task::spawn;"
1047 msgid "~~~~ {.ignore} # use std::task; # do task::spawn {"
1050 "use std::task::spawn;"
1053 #: src/doc/rust.md:2413
1055 #| msgid "## Using other crates"
1056 msgid "### Unary operator expressions"
1057 msgstr "## 他のクレートの利用"
1060 #: src/doc/rust.md:2438
1062 #| msgid "## Using other crates"
1063 msgid "### Binary operator expressions"
1064 msgstr "## 他のクレートの利用"
1067 #: src/doc/rust.md:2447
1069 #| msgid "## Operators"
1070 msgid "#### Arithmetic operators"
1074 #: src/doc/rust.md:2470
1076 #| msgid "## Operators"
1077 msgid "#### Bitwise operators"
1081 #: src/doc/rust.md:2493
1083 #| msgid "# Control structures"
1084 msgid "#### Lazy boolean operators"
1088 #: src/doc/rust.md:2502
1090 #| msgid "# Control structures"
1091 msgid "#### Comparison operators"
1095 #: src/doc/rust.md:2529
1097 #| msgid "## Tuple structs"
1098 msgid "#### Type cast expressions"
1102 #: src/doc/rust.md:2540
1104 #| msgid "## Syntax extensions"
1105 msgid "An example of an `as` expression:"
1109 #: src/doc/rust.md:2553
1111 #| msgid "## Operators"
1112 msgid "#### Assignment expressions"
1116 #: src/doc/rust.md:2562
1118 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1119 msgid "~~~~ # let mut x = 0; # let y = 0;"
1122 " let hi = \"hi\";\n"
1123 " let mut count = 0;"
1126 #: src/doc/rust.md:2567
1128 #| msgid "# Control structures"
1129 msgid "#### Compound assignment expressions"
1133 #: src/doc/rust.md:2576
1135 #| msgid "## Operators"
1136 msgid "#### Operator precedence"
1140 #: src/doc/rust.md:2599
1142 #| msgid "## Tuples"
1143 msgid "### Grouped expressions"
1147 #: src/doc/rust.md:2609
1149 #| msgid "## A minimal example"
1150 msgid "An example of a parenthesized expression:"
1154 #: src/doc/rust.md:2613
1156 #| msgid "~~~~ # let mystery_object = ();"
1157 msgid "~~~~ let x = (2 + 3) * 4; ~~~~"
1160 "# let mystery_object = ();"
1163 #: src/doc/rust.md:2616
1165 #| msgid "## Syntax extensions"
1166 msgid "### Call expressions"
1170 #: src/doc/rust.md:2629
1172 #| msgid "## Syntax extensions"
1173 msgid "Some examples of call expressions:"
1177 #: src/doc/rust.md:2633
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; }"
1183 "~~~~ # use std::from_str::FromStr; # fn add(x: int, y: int) -> int { 0 }"
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; }"
1190 #: src/doc/rust.md:2637
1193 #| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
1195 "let x: int = add(1, 2); let pi: Option<f32> = FromStr::from_str(\"3.14\"); "
1199 "let x: f64 = 4.0;\n"
1200 "let y: uint = x as uint;\n"
1201 "assert!(y == 4u);\n"
1205 #: src/doc/rust.md:2639
1207 #| msgid "## Syntax extensions"
1208 msgid "### Lambda expressions"
1212 #: src/doc/rust.md:2677
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 };"
1217 "fn ten_times(f: |int|) {\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 };"
1231 #: src/doc/rust.md:2682
1234 msgid "### While loops"
1238 #: src/doc/rust.md:2693
1240 #| msgid "## A minimal example"
1245 #: src/doc/rust.md:2696
1247 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1248 msgid "~~~~ let mut i = 0;"
1251 " let hi = \"hi\";\n"
1252 " let mut count = 0;"
1255 #: src/doc/rust.md:2702
1257 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1260 " println!(\"hello\");\n"
1267 "extern crate world;\n"
1268 "fn main() { println(~\"hello \" + world::explore()); }\n"
1272 #: src/doc/rust.md:2704
1275 msgid "### Infinite loops"
1279 #: src/doc/rust.md:2719
1281 #| msgid "## Syntax extensions"
1282 msgid "### Break expressions"
1286 #: src/doc/rust.md:2732
1288 #| msgid "# Control structures"
1289 msgid "### Continue expressions"
1293 #: src/doc/rust.md:2751
1295 #| msgid "## Freezing"
1296 msgid "### For expressions"
1300 #: src/doc/rust.md:2760
1302 #| msgid "## A minimal example"
1303 msgid "An example of a for loop over the contents of a vector:"
1307 #: src/doc/rust.md:2774
1309 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1311 "for e in v.iter() {\n"
1318 "extern crate world;\n"
1319 "fn main() { println(~\"hello \" + world::explore()); }\n"
1323 #: src/doc/rust.md:2776
1325 #| msgid "## A minimal example"
1326 msgid "An example of a for loop over a series of integers:"
1330 #: src/doc/rust.md:2785
1332 #| msgid "## Syntax extensions"
1333 msgid "### If expressions"
1337 #: src/doc/rust.md:2806
1339 #| msgid "## Syntax extensions"
1340 msgid "### Match expressions"
1344 #: src/doc/rust.md:2885
1346 #| msgid "## Syntax extensions"
1347 msgid "An example of a `match` expression:"
1351 #: src/doc/rust.md:2935
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 };"
1356 " let a = Cons(6, ~Cons(7, ~Cons(42, ~Nil)));\n"
1357 " assert!(is_sorted(&a));\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 };"
1366 #: src/doc/rust.md:2967
1368 #| msgid "~~~~ # let mystery_object = ();"
1369 msgid "~~~~ # let x = 2;"
1372 "# let mystery_object = ();"
1375 #: src/doc/rust.md:2997
1377 #| msgid "## Syntax extensions"
1378 msgid "### Return expressions"
1382 #: src/doc/rust.md:3008
1384 #| msgid "## A minimal example"
1385 msgid "An example of a `return` expression:"
1389 #: src/doc/rust.md:3017
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; }"
1394 "fn max(a: int, b: int) -> int {\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; }"
1407 #: src/doc/rust.md:3021
1409 #| msgid "## Tuples"
1414 #: src/doc/rust.md:3030
1416 #| msgid "## Primitive types and literals"
1417 msgid "### Primitive types"
1418 msgstr "## プリミティブ型とリテラル"
1421 #: src/doc/rust.md:3032
1423 #| msgid "## Primitive types and literals"
1424 msgid "The primitive types are the following:"
1425 msgstr "## プリミティブ型とリテラル"
1427 #. type: Bullet: '* '
1428 #: src/doc/rust.md:3038
1430 #| msgid "# Closures"
1431 msgid "The machine types."
1434 #. type: Bullet: '* '
1435 #: src/doc/rust.md:3038
1437 #| msgid "# Closures"
1438 msgid "The machine-dependent integer and floating-point types."
1442 #: src/doc/rust.md:3040
1444 #| msgid "# Closures"
1445 msgid "#### Machine types"
1449 #: src/doc/rust.md:3042
1451 #| msgid "## Primitive types and literals"
1452 msgid "The machine types are the following:"
1453 msgstr "## プリミティブ型とリテラル"
1456 #: src/doc/rust.md:3056
1458 #| msgid "# Closures"
1459 msgid "#### Machine-dependent integer types"
1463 #: src/doc/rust.md:3068
1465 #| msgid "# Closures"
1466 msgid "### Textual types"
1470 #: src/doc/rust.md:3081
1472 #| msgid "## Tuples"
1473 msgid "### Tuple types"
1477 #: src/doc/rust.md:3096
1479 #| msgid "# Vectors and strings"
1480 msgid "An example of a tuple type and its use:"
1484 #: src/doc/rust.md:3105
1486 #| msgid "# Closures"
1487 msgid "### Vector types"
1491 #: src/doc/rust.md:3123
1493 #| msgid "## A minimal example"
1494 msgid "An example of a vector type and its use:"
1498 #: src/doc/rust.md:3129
1501 #| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
1503 "~~~~ let v: &[int] = &[7, 5, 3]; let i: int = v[2]; assert!(i == 3); ~~~~"
1506 "let x: f64 = 4.0;\n"
1507 "let y: uint = x as uint;\n"
1508 "assert!(y == 4u);\n"
1512 #: src/doc/rust.md:3134
1514 #| msgid "# Closures"
1515 msgid "### Structure types"
1519 #: src/doc/rust.md:3156
1521 #| msgid "# Closures"
1522 msgid "### Enumerated types"
1526 #: src/doc/rust.md:3174
1528 #| msgid "# Closures"
1529 msgid "### Recursive types"
1533 #: src/doc/rust.md:3190
1535 #| msgid "# Vectors and strings"
1536 msgid "An example of a *recursive* type and its use:"
1540 #: src/doc/rust.md:3201
1542 #| msgid "# Closures"
1543 msgid "### Pointer types"
1547 #: src/doc/rust.md:3249
1549 #| msgid "# Functions"
1550 msgid "### Function types"
1554 #: src/doc/rust.md:3255
1556 #| msgid "## A minimal example"
1557 msgid "An example of a `fn` type:"
1561 #: src/doc/rust.md:3260
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; }"
1566 "fn add(x: int, y: int) -> int {\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; }"
1575 #: src/doc/rust.md:3262
1577 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1578 msgid "let mut x = add(5,7);"
1581 " let hi = \"hi\";\n"
1582 " let mut count = 0;"
1585 #: src/doc/rust.md:3269
1587 #| msgid "# Closures"
1588 msgid "### Closure types"
1592 #: src/doc/rust.md:3274
1594 #| msgid "## A minimal example"
1595 msgid "An example of creating and calling a closure:"
1599 #: src/doc/rust.md:3279
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);"
1606 "let captured_var = 20;\n"
1607 "let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, "
1611 #: src/doc/rust.md:3284
1613 #| msgid "let captured_var = 20; let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, arg));"
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"
1620 "let captured_var = 20;\n"
1621 "let closure = |arg| println(fmt!(\"captured_var=%d, arg=%d\", captured_var, arg));"
1624 #: src/doc/rust.md:3295
1626 #| msgid "# Closures"
1627 msgid "### Object types"
1631 #: src/doc/rust.md:3309
1633 #| msgid "## A minimal example"
1634 msgid "An example of an object type:"
1638 #: src/doc/rust.md:3314
1640 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1643 "trait Printable {\n"
1644 " fn to_string(&self) -> StrBuf;\n"
1649 "extern crate world;\n"
1650 "fn main() { println(~\"hello \" + world::explore()); }\n"
1654 #: src/doc/rust.md:3318
1656 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1658 "impl Printable for int {\n"
1659 " fn to_string(&self) -> StrBuf { self.to_str() }\n"
1664 "extern crate world;\n"
1665 "fn main() { println(~\"hello \" + world::explore()); }\n"
1669 #: src/doc/rust.md:3327
1671 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1674 " print(@10 as @Printable);\n"
1680 "extern crate world;\n"
1681 "fn main() { println(~\"hello \" + world::explore()); }\n"
1685 #: src/doc/rust.md:3332
1687 #| msgid "## Tuples"
1688 msgid "### Type parameters"
1692 #: src/doc/rust.md:3350
1694 #| msgid "# Closures"
1695 msgid "### Self types"
1699 #: src/doc/rust.md:3359
1701 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1704 "trait Printable {\n"
1705 " fn make_string(&self) -> StrBuf;\n"
1710 "extern crate world;\n"
1711 "fn main() { println(~\"hello \" + world::explore()); }\n"
1715 #: src/doc/rust.md:3366
1717 #| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
1719 "impl Printable for StrBuf {\n"
1720 " fn make_string(&self) -> StrBuf {\n"
1721 " (*self).clone()\n"
1728 "extern crate world;\n"
1729 "fn main() { println(~\"hello \" + world::explore()); }\n"
1733 #: src/doc/rust.md:3371
1735 #| msgid "## Tuples"
1736 msgid "## Type kinds"
1740 #: src/doc/rust.md:3429
1742 #| msgid "## Managed boxes"
1743 msgid "# Memory and concurrency models"
1744 msgstr "## マネージドボックス"
1747 #: src/doc/rust.md:3441
1749 #| msgid "## Managed boxes"
1750 msgid "## Memory model"
1751 msgstr "## マネージドボックス"
1754 #: src/doc/rust.md:3450
1756 #| msgid "# Introduction"
1757 msgid "### Memory allocation and lifetime"
1758 msgstr "# イントロダクション"
1761 #: src/doc/rust.md:3468
1763 #| msgid "# Ownership"
1764 msgid "### Memory ownership"
1768 #: src/doc/rust.md:3492
1770 #| msgid "## Managed boxes"
1771 msgid "### Memory slots"
1772 msgstr "## マネージドボックス"
1775 #: src/doc/rust.md:3525
1777 #| msgid "## Managed boxes"
1778 msgid "### Memory boxes"
1779 msgstr "## マネージドボックス"
1782 #: src/doc/rust.md:3547
1784 #| msgid "~~~~ let hi = \"hi\"; let mut count = 0;"
1785 msgid "~~~~ let x: @int = @10; let x: ~int = ~10; ~~~~"
1788 " let hi = \"hi\";\n"
1789 " let mut count = 0;"
1792 #: src/doc/rust.md:3556
1795 #| "~~~ # struct Point { x: f64, y: f64 } let point = &@~Point { x: 10f, y: "
1796 #| "20f }; println(fmt!(\"%f\", point.x)); ~~~"
1798 "~~~~ struct Foo { y: int } let x = @Foo{y: 10}; assert!(x.y == 10); ~~~~"
1801 "# struct Point { x: f64, y: f64 }\n"
1802 "let point = &@~Point { x: 10f, y: 20f };\n"
1803 "println(fmt!(\"%f\", point.x));\n"
1807 #: src/doc/rust.md:3581
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 };"
1812 " let x: @int = @10;\n"
1813 " takes_boxed(x);\n"
1814 " takes_unboxed(*x);\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 };"
1824 #: src/doc/rust.md:3583
1826 #| msgid "## Traits"
1831 #: src/doc/rust.md:3608
1833 #| msgid "## Conditionals"
1834 msgid "### Communication between tasks"
1838 #: src/doc/rust.md:3668
1840 #| msgid "[Tasks and communication][tasks]"
1841 msgid "### Task scheduling"
1842 msgstr "[タスクと通信][tasks]"
1845 #: src/doc/rust.md:3688
1847 #| msgid "# Introduction"
1848 msgid "### Memory allocation"
1849 msgstr "# イントロダクション"
1852 #: src/doc/rust.md:3700
1854 #| msgid "# Closures"
1855 msgid "### Built in types"
1859 #: src/doc/rust.md:3709
1861 #| msgid "[Tasks and communication][tasks]"
1862 msgid "### Task scheduling and communication"
1863 msgstr "[タスクと通信][tasks]"
1866 #: src/doc/rust.md:3717
1868 #| msgid "## Freezing"
1873 #: src/doc/rust.md:3822
1875 #| msgid "## Freezing"
1876 msgid "### Logging system"
1880 #: src/doc/rust.md:3860
1882 #| msgid "## Conventions"
1883 msgid "#### Logging Expressions"
1884 msgstr "## 本書の表記について"
1887 #: src/doc/rust.md:3889
1889 msgid "## Influences"
1890 msgstr "# ポインタのデリファレンス"