aboutsummaryrefslogtreecommitdiffstats
path: root/README.EXT.ja
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 18:02:02 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 18:02:02 +0000
commitf98759935c5b0b33f5ba09115e7ff1fdf52bce4b (patch)
tree90beb282ac13d0e05f3f48f51006e03a7e3ef929 /README.EXT.ja
parent75ba47e8e87e7dd2c92f1dee2cac834b505429f4 (diff)
downloadruby-f98759935c5b0b33f5ba09115e7ff1fdf52bce4b.tar.gz
* README.EXT, README.EXT.ja: Improve the document about
rb_scan_args(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT.ja')
-rw-r--r--README.EXT.ja28
1 files changed, 17 insertions, 11 deletions
diff --git a/README.EXT.ja b/README.EXT.ja
index feecc26e2b..de2fe60f2b 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -778,20 +778,26 @@ pre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args]
post-arg-spec := sym-for-variable-length-args [num-of-trailing-mandatory-args]
block-arg-spec := sym-for-block-arg
-num-of-leading-mandatory-args := DIGIT ; -- 先頭に置かれる省略不可能な引数の数
-num-of-optional-args := DIGIT ; -- 続いて置かれる省略可能な引数の数
-sym-for-variable-length-args := "*" ; -- 続いて置かれる可変長引数をRubyの配列で
- ; 取得するための指定
-num-of-trailing-mandatory-args := DIGIT ; -- 終端に置かれる省略不可能な引数の数
-sym-for-block-arg := "&" ; -- イテレータブロックを取得するための指定
+num-of-leading-mandatory-args := DIGIT ; 先頭に置かれる省略不可能な引数の数
+num-of-optional-args := DIGIT ; 続いて置かれる省略可能な引数の数
+sym-for-variable-length-args := "*" ; 続いて置かれる可変長引数を
+ ; Rubyの配列で取得するための指定
+num-of-trailing-mandatory-args := DIGIT ; 終端に置かれる省略不可能な引数の数
+sym-for-block-arg := "&" ; イテレータブロックを取得するための
+ ; 指定
--
-dbm.cの例では,フォーマットは"11"ですから,引数は最低1つ
-で,2つまで許されるという意味になります.省略されている時の
-変数の値はnil(C言語のレベルではQnil)になります.
+dbm.cの例では,フォーマットは"11"ですから,引数は最低1つで,2つ
+(1+1)まで許されるという意味になります.従って,フォーマット文
+字列に続いて2つの変数への参照を置く必要があります.それらには
+取得した変数がセットされます.変数への参照の代わりにNULLを指
+定することもでき,その場合は取得した引数の値は捨てられます.
+なお、省略可能引数が省略された時の変数の値はnil(C言語のレベル
+ではQnil)になります.
-最後に、引数をRubyの配列として受け取るものにはThread#initializeがあります.
-実装はこうです.
+
+最後に,引数をRubyの配列として受け取るものには
+Thread#initializeがあります.実装はこうです.
--
static VALUE