<bool> 处的其他选项标签 [英] other option at place of <bool> tag

查看:30
本文介绍了<bool> 处的其他选项标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<if>
   <bool>
      <isgreaterthan arg1="${abc}" arg2="${xyz}"/>
   </bool>
</if>

当我运行代码时,它显示错误 如果不支持嵌套的bool"元素.if

when i am running the code, it's showing the error if doesn't support the nested "bool" element. is there any other option is there at the place of bool which supported by if

推荐答案

Ant Flaka 是一个新的 Ant 插件,它提供了一种创新的表达式语言,使许多脚本部分过时了.除此之外,Flaka 还提供了条件和重复的控制结构,例如 when、unless、while、for、choose、switch ..您使用 Flaka 的 if 语句看起来像 =

Ant Flaka is a new Ant Plugin that provides an innovative Expression Language which makes many scripting part obsolete. Beside that Flaka provides conditional and repetitive control structures like when, unless, while, for, choose, switch .. Your if statement with Flaka would look like =

<project xmlns:fl="antlib:it.haefelinger.flaka">

  <property name="digitA" value="42"/>
  <property name="digitB" value="23"/>
  <property name="wordA"  value="abcd"/>
  <property name="wordB"  value="efgh"/>

  <!-- compare of digits -->
  <fl:when test=" '${digitA}' > '${digitB}' ">
    <echo>${digitA} gt ${digitB}</echo>
  </fl:when>

  <!-- example with string compare in switch -->
  <fl:switch value="${wordA}">
    <cmp gt="${wordB}">
      <echo>${wordA} gt ${wordB}</echo>
    </cmp>
    <cmp lt="${wordB}">
    <echo>${wordA} lt ${wordB}</echo>
    </cmp>
  </fl:switch>

</project>

请参阅全面的Flaka 手册了解更多详情!

please see the comprehensive Flaka Manual for further details !

这篇关于&lt;bool&gt; 处的其他选项标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆