www.baidu.com

          JavaCode--我愛你,芳兒

          JavaStudy--我愛你,芳兒

          Ruby: Step by Step Study

          Keywords and Identifiers

          The keywords (or reserved words) in Ruby typically cannot be used for other purposes. These are as follows:

          BEGIN END alias and begin
          break case class def defined
          do else elsif end ensure
          false for if in module
          next nil not or redo
          rescue retry return self super
          then true undef unless until
          when while yield    

          Variables and other identifiers normally start with an alphabetic letter or a special modifier. The basic rules are as follows:

          • Local variables (and pseudo-variables such as self and nil) begin with a lowercase letter.

          • Global variables begin with a dollar sign ($).

          • Instance variables (within an object) begin with an "at" sign (@).

          • Class variables (within a class) begin with two "at" signs (@@).

          • Constants begin with capital letters.

          For purposes of forming identifiers, the underscore (_) may be used as a lowercase letter. Special variables starting with a dollar sign (such as $1 and $/) are not dealt with here.

          The following list provides some examples:

          • Local variables: alpha, _ident, some_var

          • Pseudo-variables: self, nil, __FILE__

          • Constants: K6chip, Length, LENGTH

          • Instance variables: @foobar, @thx1138, @NOT_CONST

          • Class variable: @@phydeaux, @@my_var, @@NOT_CONST

          • Global variables: $beta, $B12vitamin, $NOT_CONST




           

          芳兒寶貝.我愛你

          posted on 2007-12-11 15:15 wǒ愛伱--咾婆 閱讀(266) 評論(0)  編輯  收藏 所屬分類: Ruby Study

          導航

          統計

          公告

          芳兒寶貝.我愛你


          黑客基地
          http://www.hackbase.com
          全球最大的黑客門戶網站


           最近在讀的書:

          常用鏈接

          留言簿(1)

          隨筆分類(37)

          JavaCode

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 明光市| 通化市| 都昌县| 曲周县| 张家口市| 洪江市| 阳曲县| 内乡县| 肃南| 威海市| 司法| 林周县| 深泽县| 开江县| 阳高县| 凤城市| 胶南市| 丹巴县| 龙陵县| 奎屯市| 灵武市| 彩票| 深水埗区| 准格尔旗| 瓦房店市| 清水县| 弥勒县| 越西县| 延安市| 稻城县| 手机| 枣强县| 上饶县| 吉林省| 汕尾市| 西丰县| 哈尔滨市| 囊谦县| 张家港市| 叙永县| 大同县|