[#139] ruby 0.97 available — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろ@トヨタケーラムです.
1 message
1996/02/13
[#145] Re: The black face. — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろ@トヨタケーラムです.
1 message
1996/02/14
[#182] Re: DOS port — Kazuhiko Iwama <iwama@...>
■ [ruby-list:178] Re: DOS port
1 message
1996/02/20
[#184] Re: DOS port — Kazuhiko Iwama <iwama@...>
■ [ruby-list:181] Re: DOS port
1 message
1996/02/20
[#185] Re: DOS port — Kazuhiko Iwama <iwama@...>
■ [ruby-list:183] Re: DOS port
1 message
1996/02/20
[#196] Re: DOS port — Kazuhiko Iwama <iwama@...>
■ [ruby-list:183] Re: DOS port
1 message
1996/02/26
[#198] Re: DOS port — Kazuhiko Iwama <iwama@...>
■ [ruby-list:197] Re: DOS port
1 message
1996/02/26
[#201] Re: ruby for JPower — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろ@トヨタケーラムです.
1 message
1996/02/26
[ruby-list:136] Re: TUTOARIAL - array and associative-array
From:
Date:
1996-02-09 04:48:42 UTC
List:
ruby-list #136
けいじゅ@事開事.三井造船です.
In [ruby-list :00135 ] the message: "[ruby-list:135] TUTOARIAL - array
and associative-array ", on Feb/09 10:01(JST) matz@caelum.co.jp
(Yukihiro Matsumoto) writes:
連想配列について質問.
>もうひとつ重要なデータ構造として連想配列というものがある.連
>想配列は任意の値をキーとする配列で,ハッシュとか辞書とも呼ば
>れる.連想配列は{ }で生成される.
>
> ruby> hash = {1 => 2, "2" => "4"}
> {"2"=>"4", 1=>2} ruby> hash[1]
> 2
> ruby> hash["2"]
> "4"
> ruby> hash[5]
> nil
> ruby> hash[5] = 10 # 値の追加
> 10
> ruby> hash
> {5=>10, "2"=>"4", 1=>2}
> ruby> hash[1] = nil # 値の削除
> nil
> ruby> hash[1]
> nil
> ruby> hash
> {5=>10, "2"=>"4"}
>
>配列や連想配列を使うと簡単にデータのまとまりを操作できる.
キーの一致は何で比較するのですか? 値? オブジェクトID(ポインタ)?
__
.....................................石塚 圭樹@事開事.三井造船(株)...
------------->アドレス変わりました!! e-mail: keiju@csg.mes.co.jp <----