Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MXML 1.49 KB | None | 0 0
  1. <script>
  2.     <variable name="x" value="'Bob'" />
  3.     <function name="func">
  4.         <parameters>
  5.             <parameter>x</parameter>
  6.         </parameters>
  7.         <body>
  8.             <call function="print">
  9.                 <argument>"hey " .. x</argument>
  10.             </call>
  11.             <if-statement>
  12.                 <if>
  13.                     <checks>
  14.                         <check operator="or" lefthand="x" comparator="==" righthand="5"/>
  15.                         <check operator="or" lefthand="x" comparator="==" righthand="y"/>
  16.                     </checks>
  17.                     <body>
  18.                         <call function="print">
  19.                             <argument>"hey it's a 5!"</argument>
  20.                         </call>
  21.                     </body>
  22.                 </if>
  23.                 <elseif>
  24.                     <checks>
  25.                         <check operator="or" lefthand="x" comparator="&lt;" righthand="5"/>
  26.                     </checks>
  27.                     <body>
  28.                         <call function="print">
  29.                             <argument>"hey it's lower than 5!"</argument>
  30.                         </call>
  31.                     </body>
  32.                 </elseif>
  33.                 <else>
  34.                     <body>
  35.                         <call function="print">
  36.                             <argument>"hey it's nothing I know!"</argument>
  37.                         </call>
  38.                     </body>
  39.                 </else>
  40.             </if-statement>
  41.             <for-loop variable="i" start="1" end="10" increments="1">
  42.                 <body>
  43.                     <call function="print">
  44.                         <argument>i</argument>
  45.                     </call>
  46.                 </body>
  47.             </for-loop>
  48.             <pairs-loop key="key" value="value" variable="{1, 2, 3}">
  49.                 <body>
  50.                     <call function="print">
  51.                         <argument>key .. ":" .. value</argument>
  52.                     </call>
  53.                 </body>
  54.             </pairs-loop>
  55.         </body>
  56.     </function>
  57.     <call function="func">
  58.         <argument>x</argument>
  59.     </call>
  60.     <call function="func">
  61.         <argument>5</argument>
  62.     </call>
  63. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement