Date: Fri, 29 Mar 2024 12:54:10 +0100 (CET) Message-ID: <334311715.1984.1711713250320@nm-docs> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1983_4416939.1711713250320" ------=_Part_1983_4416939.1711713250320 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
In Velocity, you can declare a variable and set its value by using the <= strong>#set directive, for example:
##Strin= g=20 #set ($var =3D "abc")=20 ##Boolean=20 #set($var2 =3D true)=20 ##Value=20 #set($var3 =3D 10)
The above example shows that $var has a string value, <= strong>$var2 has a Boolean value, and $var3 has a= numerical value. The #set directive can also set an array= to a declared Velocity variable. To assign an array to a variable type, fo= r example:
#set($v= ar =3D ["a", "b", "c"])