String literals are enclosed in double quotes or single quotes. For example "Hello $name" or ’Hello’.String literals enclosed in double quotes are parsed and rendered.
#set( $str1 = 'hello' )#set( $str2 = 'world' )#set( $str3 = "$str1 cruel $str2" )$str3 hello cruel world
#set( $str1 = 'hello' )#set( $str2 = 'world' )#set( $str3 = '$str1 cruel $str2' )$str3 $str1 cruel $str2If the string literals are enclosed by single quotes, and you want to include single quotes in the output string, you must use two consecutive single quotes. The same applies to string literals enclosed by double quotes.
#set( $a = 'orange')$a#set( $b = 'Hi ''banana''')$b#set( $c = "Hi ""$a""")$c#set( $d = "Hi ""$a"" and 'apple'" )$d orangeHi 'banana'Hi "orange"Hi "orange" and 'apple'
#set($myint = 10)$myint 10
#set($mydouble = 132.245)$mydouble 132.245
#set($mybool = true)#if($mybool)Hello world#end Hello world
OpenText StreamServe 5.6 | Updated: 2013-03-01 |