velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johnny Dynn <john_d...@yahoo.ca>
Subject String to Int
Date Fri, 06 Dec 2002 18:08:48 GMT
Newbie question....

Say I have a string in velocity...

#set($num_loop = "5")

How can I convert that so I can, for example, use it
in a foreach loop?

eg.

#foreach( $i in [1..$num_loop] )
  $i
#end

I know I can just set the loop_count to 1 instead of
"1" but I was just curious if there some way.

Thanks,


jd

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message