I am trying to implement factorial in an XML language

I am trying to implement factorial in xml 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 is a bit verbose.

How does this language compare to other XML languages?

Special handling of variables, selections, loops, and routines.

+3
source share

Source: https://habr.com/ru/post/1729791/


All Articles