www.baidu.com

          JavaCode--我愛(ài)你,芳兒

          JavaStudy--我愛(ài)你,芳兒

          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




           

          芳兒寶貝.我愛(ài)你

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

          導(dǎo)航

          統(tǒng)計(jì)

          公告

          芳兒寶貝.我愛(ài)你


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


           最近在讀的書:

          常用鏈接

          留言簿(1)

          隨筆分類(37)

          JavaCode

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 巧家县| 莎车县| 南昌县| 南昌市| 汉川市| 汉源县| 巴彦淖尔市| 都安| 视频| 綦江县| 桐梓县| 崇州市| 永修县| 商河县| 嘉善县| 济南市| 沽源县| 会东县| 邓州市| 阜新市| 宁明县| 静安区| 西安市| 汝州市| 哈密市| 临泉县| 雅安市| 贵德县| 灌云县| 崇仁县| 阳春市| 班玛县| 镇宁| 达尔| 浪卡子县| 武清区| 邢台市| 武邑县| 轮台县| 清镇市| 醴陵市|