Changeset 8392 for docs/nowelium

Show
Ignore:
Timestamp:
03/26/08 11:43:08 (5 years ago)
Author:
nowelium
Message:
 
Location:
docs/nowelium/ioDocs
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • docs/nowelium/ioDocs/IoGuide_ja.html

    r8176 r8392  
    3636 
    3737 
    38 <div class=indexSection><a href="#Objects">Objects</a></div> 
     38<div class=indexSection><a href="#Objects">オブジェクト</a></div> 
    3939<div class=indexItem><a href="#Objects-Overview">Overview</a></div> 
    40 <div class=indexItem><a href="#Objects-Prototypes">Prototypes</a></div> 
    41 <div class=indexItem><a href="#Objects-Inheritance">Inheritance</a></div> 
    42 <div class=indexItem><a href="#Objects-Methods">Methods</a></div> 
    43 <div class=indexItem><a href="#Objects-Blocks">Blocks</a></div> 
    44 <div class=indexItem><a href="#Objects-Forward">Forward</a></div> 
     40<div class=indexItem><a href="#Objects-Prototypes">プロトタイプ</a></div> 
     41<div class=indexItem><a href="#Objects-Inheritance">継承</a></div> 
     42<div class=indexItem><a href="#Objects-Methods">メソッド</a></div> 
     43<div class=indexItem><a href="#Objects-Blocks">ブロック</a></div> 
     44<div class=indexItem><a href="#Objects-Forward">転送</a></div> 
    4545<div class=indexItem><a href="#Objects-Resend">Resend</a></div> 
    4646<div class=indexItem><a href="#Objects-Super">Super</a></div> 
    47 <div class=indexItem><a href="#Objects-Introspection">Introspection</a></div> 
     47<div class=indexItem><a href="#Objects-Introspection">イントロスペクション</a></div> 
    4848 
    4949 
     
    5151<td valign=top style="width:33%"> 
    5252 
    53 <div class=indexSection><a href="#Control-Flow">Control Flow</a></div> 
     53<div class=indexSection><a href="#Control-Flow">制御構造</a></div> 
    5454<div class=indexItem><a href="#Control-Flow-true-false-and-nil">true, false and nil</a></div> 
    5555<div class=indexItem><a href="#Control-Flow-Comparison">Comparison</a></div> 
    56 <div class=indexItem><a href="#Control-Flow-Conditions">Conditions</a></div> 
     56<div class=indexItem><a href="#Control-Flow-Conditions">条件分岐</a></div> 
    5757<div class=indexItem><a href="#Control-Flow-Loops">Loops</a></div> 
    5858 
     
    6060<div class=indexSection><a href="#Importing">Importing</a></div> 
    6161 
    62 <div class=indexSection><a href="#Concurrency">Concurrency</a></div> 
     62<div class=indexSection><a href="#Concurrency">並行動作</a></div> 
    6363<div class=indexItem><a href="#Concurrency-Coroutines">Coroutines</a></div> 
    6464<div class=indexItem><a href="#Concurrency-Scheduler">Scheduler</a></div> 
     
    6868<div class=indexItem><a href="#Concurrency-Pause and Resume">Pause and Resume</a></div> 
    6969 
    70 <div class=indexSection><a href="#Exceptions">Exceptions</a></div> 
     70<div class=indexSection><a href="#Exceptions">例外</a></div> 
    7171<div class=indexItem><a href="#Exceptions-Raise">Raise</a></div> 
    7272<div class=indexItem><a href="#ExceptionsTry-and-Catch">Try and Catch</a></div> 
     
    9090--> 
    9191 
    92 <div class=indexSection><a href="#Primitives">Primitives</a></div> 
     92<div class=indexSection><a href="#Primitives">プリミティブ</a></div> 
    9393<div class=indexItem><a href="#Primitives-Object">Object</a></div> 
    9494<div class=indexItem><a href="#Primitives-List">List</a></div> 
     
    102102<div class=indexItem><a href="#Primitives-Vector">Vector</a></div> 
    103103 
    104 <div class=indexSection><a href="#Embedding">Embedding</a></div> 
     104<div class=indexSection><a href="#Embedding">組み込み</a></div> 
    105105<div class=indexItem><a href="#Embedding-Conventions">Conventions</a></div> 
    106106<div class=indexItem><a href="#Embedding-IoState">IoState</a></div> 
    107107<div class=indexItem><a href="#Embedding-Values">Values</a></div> 
    108108 
    109 <div class=indexSection><a href="#Bindings">Bindings</a></div> 
     109<div class=indexSection><a href="#Bindings">バインディング</a></div> 
    110110 
    111111<div class=indexSection><a href="#Appendix">Appendix</a></div> 
    112112<div class=indexItem><a href="#Appendix-Grammar">文法</a></div> 
    113 <div class=indexItem><a href="#Appendix-Credits">Credits</a></div> 
     113<div class=indexItem><a href="#Appendix-Credits">協力者</a></div> 
    114114<div class=indexItem><a href="#Appendix-References">References</a></div> 
    115115<div class=indexItem><a href="#Appendix-License">ライセンス</a></div> 
     
    129129</div> 
    130130 
    131 Io is a dynamic prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk[1] (all values are objects), Self[2] (prototype-based), NewtonScript[3] (differential inheritance), Act1[4] (actors and futures for concurrency), Lisp[5] (code is a runtime inspectable / modifiable tree) and Lua[6] (small, embeddable). 
     131Io はプロトタイプベースの動的言語である。 The ideas in Io are mostly inspired by Smalltalk[1] (all values are objects), Self[2] (prototype-based), NewtonScript[3] (differential inheritance), Act1[4] (actors and futures for concurrency), Lisp[5] (code is a runtime inspectable / modifiable tree) and Lua[6] (small, embeddable). 
    132132 
    133133<a name="Introduction-Perspective"></a> 
     
    397397</pre> 
    398398 
    399 <h4>Command Line Arguments</h4> 
    400  
    401 Example of printing out command line arguments: 
     399<h4>コマンドライン引数</h4> 
     400 
     401コマンドライン引数を出力する例: 
    402402 
    403403<pre> 
     
    407407<h4>launchPath</h4> 
    408408 
    409 The System "launchPath" slot is set to the location on the initial source file that is executed. 
     409System の "launchPath" スロットには、実行された最初のソースファイルの位置が格納されている。 
    410410 
    411411</div> 
     
    421421<h3>式</h3> 
    422422 
    423 Io has no keywords or statements. Everything is an expression composed entirely of messages, each of which is a runtime accessible object. The informal BNF description: 
     423Io キーワードや文を持たない。 Everything is an expression composed entirely of messages, each of which is a runtime accessible object. 非公式の BNF 記述: 
    424424 
    425425<pre> 
     
    436436<h3>メッセージ</h3> 
    437437 
    438 Message arguments are passed as expressions and evaluated by the receiver. Selective evaluation of arguments can be used to implement control flow. 例: 
     438メッセージ引数はレシーバに式として渡され評価される。 Selective evaluation of arguments can be used to implement control flow. 例: 
    439439 
    440440<pre> 
     
    443443</pre> 
    444444 
    445 In the above code, "for" and "if" are just normal messages, not special forms or keywords. 
     445上記コードでの、"for" と "if" は通常のメッセージであり、特殊形式やキーワードでは無い。 
    446446<p> 
    447447 
     
    479479<h3>演算子</h3> 
    480480 
    481 An operator is just a message whose name contains no alphanumeric characters (other than ":", "_", '"' or ".") or is one of the following words: or, and, return. 例:  
     481演算子とは、単に英数字以外の文字による名前をもつメソッドである。例外として、":"(コロン), "_"(アンダースコア), '"'(ダブルクォート), "."(ドット) は演算子に使えず、また次のものは英数字による名前だが演算子とする: "and", "or", "return". 例:  
    482482 
    483483<pre> 
     
    485485</pre> 
    486486 
    487 This just gets compiled into the normal message:  
     487丁度次のような通常の形式のメッセージにコンパイルされる: 
    488488 
    489489<pre> 
     
    491491</pre> 
    492492 
    493 Which is the form you can use if you need to do grouping:  
     493括弧を使ってまとめることもできる: 
    494494 
    495495<pre> 
     
    497497</pre> 
    498498 
    499 Standard operators follow C's precedence order, so:  
     499標準の演算子は、C 言語と同じ優先順位で処理される。従って: 
    500500 
    501501<pre> 
     
    503503</pre> 
    504504 
    505 Is parsed as:  
     505は次のように解析される: 
    506506 
    507507<pre> 
     
    509509</pre> 
    510510 
    511 User defined operators (that don't have a standard operator name) are performed left to right. 
     511ユーザ定義の演算子 (標準の演算子名は使えない) は、常に左から右に動作する。 
    512512 
    513513<a name="Syntax-Assignment"></a> 
    514514<h3>代入</h3> 
    515515 
    516 Io has three assignment operators: 
     516Io は3つの代入演算子を持つ: 
    517517 
    518518<p> 
     
    532532</td> 
    533533<td> 
    534 <i>Creates slot, creates setter, assigns value</i> 
     534<i>スロットの生成, setter の生成, 値の代入</i> 
    535535</td> 
    536536</tr> 
     
    541541</td> 
    542542<td> 
    543 <i>Creates slot, assigns value</i> 
     543<i>スロットの生成, 値の代入</i> 
    544544</td> 
    545545</tr> 
     
    550550</td> 
    551551<td> 
    552 <i>Assigns value to slot if it exists, otherwise raises exception</i> 
     552<i>スロットが存在すれば値の代入、もしなければ例外を発生する</i> 
    553553</td> 
    554554</tr> 
     
    557557<p> 
    558558 
    559 These operators are compiled to normal messages whose methods can be overridden. For example: 
     559These operators are compiled to normal messages whose methods can be overridden. : 
    560560 
    561561 
     
    657657</pre> 
    658658 
    659 The "#" style is useful for unix scripts:  
     659"#" スタイルは Unix でのスクリプトに役立ちます: 
    660660 
    661661<pre> 
     
    663663</pre> 
    664664 
    665 That's it! You now know everything there is to know about Io's syntax. Control flow, objects, methods, exceptions are expressed with the syntax and semantics described above.  
     665貴方は Io の文法について知るために必要なこと全てを知っている。 制御構造・オブジェクト・メソッド・例外は 上記で説明した構文で表現されます。  
    666666 
    667667 
    668668</div> 
    669 <h2>Objects<a name="Objects"></a></h2> 
     669<h2>オブジェクト<a name="Objects"></a></h2> 
    670670<div class=indent> 
    671671 
     
    720720 
    721721<a name="Objects-Prototypes"></a> 
    722 <h3>Prototypes</h3> 
     722<h3>プロトタイプ</h3> 
    723723 
    724724In Io, everything is an object (including the locals storage of a block and the namespace itself) and all actions are messages (including assignment). Objects are composed of a list of key/value pairs called slots, and an internal list of objects from which it inherits called protos. A slot's key is a symbol (a unique immutable sequence) and its value can be any type of object. 
     
    741741 
    742742<a name="Objects-Inheritance"></a> 
    743 <h3>Inheritance</h3> 
     743<h3>継承</h3> 
    744744 
    745745When an object receives a message it looks for a matching slot, if not found, the lookup continues depth first recursively in its protos. Lookup loops are detected (at runtime) and avoided. If the matching slot contains an activatable object, such as a Block or CFunction, it is activated, if it contains any other type of value it returns the value. Io has no globals and the root object in the Io namespace is called the Lobby. 
     
    761761</pre> 
    762762 
    763 <h4>Multiple Inheritance</h4> 
     763<h4>多重継承</h4> 
    764764 
    765765You can add any number of protos to an object's protos list. When responding to a message, the lookup mechanism does a depth first search of the proto chain. 
    766766 
    767767<a name="Objects-Methods"></a> 
    768 <h3>Methods</h3> 
     768<h3>メソッド</h3> 
    769769 
    770770A method is an anonymous function which, when called, creates an object to store its locals and sets the local's proto pointer and its self slot to the target of the message. The Object method method() can be used to create methods. 例: 
     
    791791<h4>引数</h4> 
    792792 
    793 Methods can also be defined to take arguments. 例:  
     793メソッドは引数をとるようにも定義できる。 例:  
    794794 
    795795<pre> 
     
    797797</pre> 
    798798 
    799 The general form is:  
     799一般的な形式: 
    800800 
    801801<pre><i> 
     
    804804 
    805805<a name="Objects-Blocks"></a> 
    806 <h3>Blocks</h3> 
     806<h3>ブロック</h3> 
    807807 
    808808A block is the same as a method except it is lexically scoped. That is, variable lookups continue in the context of where the block was created instead of the target of the message which activated the block. A block can be created using the Object method block(). Example of creating a block: 
     
    812812</pre> 
    813813 
    814 <h4>Blocks vs. Methods</h4> 
    815  
    816 This is sometimes a source of confusion so it's worth explaining in detail. Both methods and blocks create an object to hold their locals when they are called. The difference is what the "proto" and "self" slots of that locals object are set to. In a method, those slots are set to the target of the message. In a block, they're set to the locals object where the block was created. So a failed variable lookup in a block's locals continue in the locals where it was created. And a failed variable lookup in a method's locals continue in the object to which the message that activated it was sent. 
     814<h4>Blocks vs. メソッド</h4> 
     815 
     816This is sometimes a source of confusion so it's worth explaining in detail. Both methods and blocks create an object to hold their locals when they are called. 違いは、ローカル領域のオブジェクト "proto" と "self" に何がセットされるかです。 メソッドでは、それらのスロットには、メッセージのターゲットがセットされる。 ブロックでは、そのブロックが作り出されたときのローカル領域オブジェクトがセットされる。 従ってブロック中では、ローカル領域にない変数は、そのブロックが作成されたときのローカル領域を辿って検索される。 そしてメソッド中では、ローカル領域にない変数は、そのメソッドを呼び出したオブジェクトを辿って検索される。 
    817817 
    818818<h4>call and self slots</h4> 
     
    866866</table> 
    867867 
    868 <h4>Variable Arguments</h4> 
     868<h4>可変長引数</h4> 
    869869 
    870870The "call message" slot in locals can be used to access the unevaluated argument messages. Example of implementing if() within Io:  
     
    895895 
    896896<a name="Objects-Forward"></a> 
    897 <h3>Forward</h3> 
     897<h3>転送</h3> 
    898898 
    899899If an object doesn't respond to a message, it will invoke its "forward" method if it has one. Here's an example of how to print the information related lookup that failed: 
     
    949949 
    950950<a name="Objects-Introspection"></a> 
    951 <h3>Introspection</h3> 
     951<h3>イントロスペクション</h3> 
    952952 
    953953Using the following methods you can introspect the entire Io namespace. There are also methods for modifying any and all of these attributes at runtime. 
     
    997997 
    998998</div> 
    999 <h2>Control Flow<a name="Control-Flow"></a></h2> 
     999<h2>制御構造<a name="Control-Flow"></a></h2> 
    10001000<div class=indent> 
    10011001