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ǒ愛伱--咾婆 閱讀(267) 評論(0)  編輯  收藏 所屬分類: Ruby Study

          導(dǎo)航

          統(tǒng)計(jì)

          公告

          芳兒寶貝.我愛你


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


           最近在讀的書:

          常用鏈接

          留言簿(1)

          隨筆分類(37)

          JavaCode

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 吉隆县| 安溪县| 麻城市| 慈利县| 济南市| 松桃| 白山市| 兖州市| 米易县| 房产| 运城市| 监利县| 辰溪县| 郁南县| 固始县| 贵港市| 吴江市| 长宁区| 阿勒泰市| 太白县| 洪雅县| 平阴县| 隆尧县| 行唐县| 博爱县| 中阳县| 徐闻县| 平定县| 保康县| 阿克苏市| 龙门县| 剑川县| 磐石市| 宜阳县| 江达县| 时尚| 乌兰浩特市| 个旧市| 东乡族自治县| 东阿县| 阳谷县|