Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.ruby Subject: Re: Learn Ruby The Hard Way Exercise 19 Date: Mon, 18 Apr 2016 21:25:57 +0200 Lines: 21 Message-ID: References: <873523bf-6a50-46f0-a3bd-20361b518960@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 6hN5Zov2KsamN/2YiBJcJgi3DzRg3j7QE7TN9Y+vLq9WtXviU= Cancel-Lock: sha1:vFQm5WLwpB7o5DCvSPEUMP37fj8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <873523bf-6a50-46f0-a3bd-20361b518960@googlegroups.com> Xref: csiph.com comp.lang.ruby:7225 On 18.04.2016 20:24, Cai Gengyang wrote: > A little confused, what exactly is the point of the exercise --- Is > it simply to introduce variables ? > > It says in the text that this exercise is to reinforce the point that > quote : "The variables in your function are not connected to the > variables in your script." --- what does this sentence mean ? Apparently it tries to teach you the concept of "scope". But there is more text on the page that should help you understand. It seems to be called "... the hard way" for a reason... :-) Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/