开发者

I'm trying to implement factorial in an xml language

I'm trying to implement factoria开发者_开发知识库l in the xml language of xcerion.


     <step id="fac">
       <alias name="p" value="={$n}*{$p}" />
       <alias name="n" value="={$n}-1" />
       <operation name="decision">
         <when test="'{$n}'>'0'" step="fac" />
       </operation>
     </step>

     <alias name="p" value="1" />
     <alias name="n" value="4" />
     <operation name="call" value="fac" />

My code works, but I think it's a bit wordy.

How does this language compare with other xml languages?

Especially handling of variables, selection, loops and subroutine calling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜