Right. But never use:
“#{var}”
I thought #{var} was used within quotes to get the value as otherwise
you just get var…
var = “Hello Ruby T. World”
“I just wanted to say #{var}” -> I just wanted to say Hello Ruby T.
World
“I just wanted to say var” -> I just wanted to say var
or am I missing the point?
To me it’s easier to do the above and much cleaner than the following:
print "I just wanted to say " + var + “, love the slippers!”
Or am I just showing my ant roots again…? ${var}
Gem
On Aug 15, 2006, at 9:27 AM, Cameron, Gemma (UK) wrote:
Right. But never use:
“#{var}”
I thought #{var} was used within quotes to get the value as
otherwise you just get var…
Correct.
var = “Hello Ruby T. World”
“I just wanted to say #{var}” -> I just wanted to say Hello Ruby
Talk World
“I just wanted to say var” -> I just wanted to say var
or am I missing the point?
Nope you have it.
What I meant to say in my other message was if it is the only thing
in the String, it’s pointless.
James Edward G. II