[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03826] Re: How to get in output a string inside an other?

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-05 11:32:31 UTC
List: ruby-talk #3826
> > I have this statement:
> > print x
> > what would be x to have in output:
> > Good bye "Ruby" Tuesday!
> 
> http://www.eng.dmu.ac.uk/~hgs/ruby/ruby-man-1.4/syntax.html#string

Indeed, good text to read. This time you might want to write

  print 'Good buy "Ruby" Tuesday!'

Or maybe you have to construct the string from parts

  require 'date2'
  the_name_of_the_language = "Ruby"
  x = %Q|Welcome "#{the_name_of_the_language}" at | + 
      Date::DAYNAMES[Date.today.wday] + "!"
  puts x

	- Aleksi

  

In This Thread

Prev Next