Hi
I want some learn about input data with keyboard. please help me and
introduce me some resource.
thanks.
···
--
Posted via http://www.ruby-forum.com/.
Hi
I want some learn about input data with keyboard. please help me and
introduce me some resource.
thanks.
--
Posted via http://www.ruby-forum.com/.
Get and puts is the most basic. Run a google search on that.
On Aug 12, 2011 7:56 PM, "amir e." <aef1370@gmail.com> wrote:
Hi
I want some learn about input data with keyboard. please help me and
introduce me some resource.
thanks.--
Posted via http://www.ruby-forum.com/\.
For every human that work with computer , it is obvious to go to search
engines for learning new things. But I propose this topic because the
persons who come to this forum ,probably are familiar with ruby and can
help me.
So , if you can't help me please don't write your junky advice.
--
Posted via http://www.ruby-forum.com/.
Excuse me. I'm guessing you're coming from a zero programming experience.
Gets waits for keyboard input and puts displays a string (text) to the
screen. Would you like an example?
Name = gets()
Puts = Name
Anything junky about that?
On Aug 12, 2011 8:11 PM, "amir e." <aef1370@gmail.com> wrote:
For every human that work with computer , it is obvious to go to search
engines for learning new things. But I propose this topic because the
persons who come to this forum ,probably are familiar with ruby and can
help me.
So , if you can't help me please don't write your junky advice.--
Posted via http://www.ruby-forum.com/\.
Variables that begin with capital letters are constants in Ruby. Probably
`Name` shouldn't be a constant. Methods aren't constants, so their names are
all lowercase, so `Puts` should actually be `puts`. A slight
reinterpretation of this program:
name = gets
puts "Hello, #{name}"
If it makes you feel more comfortable being explicit, this translates
(approximately) to:
name = $stdin.gets()
$stdout.puts("Hello, #{name}")
On Fri, Aug 12, 2011 at 7:20 AM, Allen Wyma <allen.wyma@gmail.com> wrote:
Excuse me. I'm guessing you're coming from a zero programming experience.
Gets waits for keyboard input and puts displays a string (text) to the
screen. Would you like an example?Name = gets()
Puts = NameAnything junky about that?
I apologize about that. Wrote from my phone. Auto caps is on.
Excuse me. I'm guessing you're coming from a zero programming experience.
Gets waits for keyboard input and puts displays a string (text) to the
screen. Would you like an example?Name = gets()
Puts = NameAnything junky about that?
Variables that begin with capital letters are constants in Ruby. Probably
`Name` shouldn't be a constant. Methods aren't constants, so their names
are
On Aug 12, 2011 8:36 PM, "Josh Cheek" <josh.cheek@gmail.com> wrote:
On Fri, Aug 12, 2011 at 7:20 AM, Allen Wyma <allen.wyma@gmail.com> wrote:
all lowercase, so `Puts` should actually be `puts`. A slight
reinterpretation of this program:name = gets
puts "Hello, #{name}"If it makes you feel more comfortable being explicit, this translates
(approximately) to:name = $stdin.gets()
$stdout.puts("Hello, #{name}")