mardi 31 mars 2015

Boo string interpolation not working

I downloaded the latest build of Boo this morning, and I'm trying to get started with the language. One of the features I need for my use case is Boo's string interpolation. However, I haven't been able to get it to work at all.


Here's my test code (some of which was copied directly from the Boo website):



print System.DateTime.Now

title = "My Demo Site"
print title
print "$(title)"

print """
<html>
<header> $title </header>
</html>
"""
name = "Santa Claus"
print "Hello, $name!"

now = "IMPORTANT"
print("Tomorrow will be $now")

print("""
----
Life, the Universe and Everything: $(len('answer to life the universe and everything')).
----
""")


and my output:



3/31/2015 10:25:37 AM
My Demo Site
$(title)

<html>
<header> $title </header>
</html>

Hello, $name!
Tomorrow will be $now

----
Life, the Universe and Everything: $(len('answer to life the universe and everything')).
----


What am I doing wrong?


Aucun commentaire:

Enregistrer un commentaire