From: Anthony Ob Date: 2010-09-26T05:01:08+09:00 Subject: Re: Tutorial help Anthony Ob wrote: > http://rubylearning.com/satishtalim/variables_and_assignment.html > > the a =< spits out an error > Here is what I coded with the tutorial > [code/]#p004stringusage.rb > #defining a constant > PI = 3.1416 > puts PI > # Defining a local variable > myString = 'I love my city, Pune' > puts myString > =begin > conversions > .to_i, .to_f, .to_s > =end > var1=5; > var2='2' > puts var1+var2.to_i > #<< appending to a string > a='hello' > a<<'world. > I love this world...' > puts a > =begin << marks the start of the string literal and is followed by a > dlimiter of your choice. The string literal then starts from the next > new line and finishes when the delimiter is repeated again on a line > of it own. This is know as Here document syntax. > =end > a = < #This is the string and a second line > ENG_STR > puts a[/code] btw here is the error message p004stringusage.rb:28: can't find string "END_STR" anywhere before EOF p004stringusage.rb:25: syntax error, unexpected $end, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END -- Posted via http://www.ruby-forum.com/.