1
Q
螞蟻減法
A
回答
2
您可以嘗試使用此示例:
<scriptdef name="intCompare" language="javascript">
<attribute name="leftside"/>
<attribute name="rightside"/>
<attribute name="diff"/>
<![CDATA[
var leftSide = attributes.get("leftside");
var rightSide = attributes.get("rightside");
project.setProperty(attributes.get("diff"), leftSide-rightSide);
]]>
</scriptdef>
<target name="test">
<intCompare leftside="555" rightside="9" diff="deviation"/>
<echo message="The difference is: ${deviation}"/>
</target>
1
使用常規任務
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="build.path"/>
<groovy>
properties["greater"] = properties["x"] > properties["y"]
</groovy>
相關問題
- 1. 使用螞蟻
- 2. 螞蟻和yuicompressor
- 3. 在螞蟻
- 4. 螞蟻副本
- 5. 螞蟻metricstask.jar
- 6. 與螞蟻JARring
- 7. 螞蟻在Eclipse
- 8. 從螞蟻
- 9. 從螞蟻
- 10. 螞蟻IncludeTask
- 11. 螞蟻運行
- 12. 退房螞蟻
- 13. 使用螞蟻
- 14. 使用螞蟻
- 15. 螞蟻MailLogger問題
- 16. 螞蟻對財產
- 17. 螞蟻檢測FreeBSD
- 18. 試圖用螞蟻
- 19. 如何在螞蟻
- 20. 未能與螞蟻
- 21. 螞蟻mkdir失敗
- 22. 螞蟻attrib問題
- 23. 螞蟻和水銀
- 24. 建築與螞蟻
- 25. 螞蟻:我如何在interate所有子文件夾和螞蟻
- 26. 我如何準備螞蟻的contrib-0.3.jar螞蟻的contrib
- 27. 從螞蟻調用多個螞蟻目標
- 28. 螞蟻和螞蟻節點之間有什麼區別?
- 29. 螞蟻構建失敗 - 因爲螞蟻忘記屬性?
- 30. 螞蟻和螞蟻之間的區別是乾淨的嗎?