るりまサーチ

最速Rubyリファレンスマニュアル検索!
828件ヒット [801-828件を表示] (0.014秒)

別のキーワード

  1. object then
  2. _builtin then
  3. then object
  4. then _builtin

検索結果

<< < ... 7 8 9 >>

プログラム・文・式 (6.0)

プログラム・文・式 * exp * terminate

...行へ継続します。

例:

print "hello world!\n"


===[a:exp] 式

例:

true
(1+2)*3
foo()
if test then ok else ng end

Ruby の式には、spec/variables、さまざまなspec/literal、それらの
spec/operator、if や while などのspec/control...

字句構造 (6.0)

字句構造 * identifier * comment * embed * reserved

...class ensure nil self when
END def false not super while
alias defined? for or then yield
and do if redo true __LINE__
begin else in rescue undef __FILE__...

演算子式 (6.0)

演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond

...e) #=> true
p((not false)) #=> true
//}

===[a:cond] 条件演算子

//emlist[例][ruby]{
obj == 1 ? foo : bar
//}

文法:

式1 ? 式2 : 式3

式1の結果によって式2または式3を返します。

if 式1 then 式2 else 式3 end

とまったく同じです。...
<< < ... 7 8 9 >>