Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

<while>

条件が真である限り、繰り返しアクティビティを実行します。

Synopsis

<while condition='context.IsApproved="1"'>   ...</while>

詳細

属性または要素 説明
condition 属性 必須項目。この式は、<while> 要素内のアクティビティが実行される前に毎回評価されます。結果が偽になると、<while> 要素の実行が停止されます。 整数値 1 (真の場合) または 0 (偽の場合) を求める式。この式では、この属性が含まれる <process> 要素で指定されているスクリプト言語を使用する必要があります。
namedisabledxposyposxendyend 属性 一般的な属性と要素” を参照してください。  
<annotation> 要素
その他の要素 オプション。<while> には、<alert>、<assign>、<branch>、<break>、<call>、<code>、<continue>、<delay>、<empty>、<flow>、<foreach>、<if>、<label>、<milestone>、<reply>、<rule>、<scope>、<sequence>、<sql>、<switch>、<sync>、<throw>、<trace>、<transform>、<until>、<while>、<xpath>、および <xslt> をゼロ個以上、自由に組み合わせて使用できます。  

説明

<while> 要素は、論理式の結果が整数値 1 (真) である限り、繰り返し実行される一連のアクティビティを定義します。この式は、一連のアクティビティの実行が開始される前に毎回再評価されます。

ループの実行を微調整するには、<while> 要素内で <break> 要素と <continue> 要素を使用します。以下に例を示します。

<while condition="0">

  //...do various things...

  <if condition="somecondition">
    <true>
      <break/>
    </true>
  </if>

  //...do various other things...

</while>
FeedbackOpens in a new tab