(root)
|
+- mouse = "Yerri"
|
+- age = 12
|
+- color = "brown">
${mouse} <#-- use mouse as scalar -->
${mouse.age} <#-- use mouse as hash -->
${mouse.color} <#-- use mouse as hash -->
Yerri
12
brown
The average of 3 and 5 is: ${avg(3, 5)}
The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}
The average of the price of python and elephant is: ${avg(animals.python.price, animals.elephant.price)}
本文介绍了Freemarker模板引擎中的数据模型概念,包括scalar、hashes、sequences等基本对象类型及其使用方式,并展示了如何利用这些数据模型进行计算。
5633

被折叠的 条评论
为什么被折叠?



