Yalin wrote: > > I have installed ruby with "ruby181-11.exe" on Windows XP and > wanted to try > some code samples from the Ruby Programmers Guide, but without > success. If I > run following code, I don't get any output on console: > > ------------------------------------ > a = [ 1, 'cat', 3.14 ] # array with three elements > # access the first element > a[0] ? 1 > # set the third element > a[2] = nil > # dump out the array > a ? [1, "cat", nil] > ------------------------------------ > > Just the command "puts a" works. > Any idea? The result of expressions are not automatically dumped to the console (unless you are running irb), so you must use "puts" to dump values to the console. Curt --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.610 / Virus Database: 390 - Release Date: 3/3/2004