Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

File Template integer parameter/variable

$
0
0

Hi,

I'd like to pass an integer variable to my file template, but it is interpreted as string:

 

#set( $inc = $a + 1 )

a  = $a

a + 1 = $inc

 

Create template with a = 2 and you get:

 

a = 1

a + 1 = 21

 

I expect (like to get):

 

a = 1

a + 1 = 3

 

How can I achieve this?

 

Thanks,

Michael


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>