Hi.

You would typically rather use u...@velocity.apache.org for such questions, but it's not a big deal asking here.

With what version of Velocity are you working? I tested your code against several versions and couldn't reproduce your problem.

Regards,

  Claude

On 14/11/2022 16:04, Laurens van der Klis wrote:
Hello,

Excuse me if this is the wrong channel but I came across an oddity that is either a bug or something that could/should be included in the documentation on range operators. If you define a list using a range operator, I expected the list to be 'physically' created in memory and therefore it's members could be readily addressed. However this is not the case. In the example below accessing individual list members using an index will not return a list item.

#set($foo = [1..12])
$foo.get(5) - $jaren[5]

Although I can understand it works this way from a programming point of view, it's a but confusing syntax because defining the list as [1,2,3,4,5,6,7,8,9,10,11,12] does work and looks similar to the innocent eye.

Best regards,

Laurens van der Klis
CrossmarX


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscr...@velocity.apache.org
For additional commands, e-mail: general-h...@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscr...@velocity.apache.org
For additional commands, e-mail: general-h...@velocity.apache.org

Reply via email to