<wsfdialog width="10" height="9" step="20">
   <field name="result" width="8" height="1" posx="2" posy="2" type="text">
      <value>
         0
      </value>
   </field>
   <field name="in" width="6" height="1" posx="2" posy="3" type="text">
   </field>
   <field name="rst" width="2" height="1" posx="8" posy="3" type="button">
      <code>
         values.result = 0;
values.in = &quot;&quot;;
      </code>
      <value>
         Reset
      </value>
   </field>
   <field name="add" width="2" height="1" posx="8" posy="5" type="button">
      <code>
         values.result += values.in;
values.in = &quot;&quot;;
      </code>
      <value>
         +
      </value>
   </field>
   <field name="sub" width="2" height="1" posx="8" posy="6" type="button">
      <code>
         values.result -= values.in;
values.in = &quot;&quot;;
      </code>
      <value>
         -
      </value>
   </field>
   <field name="mul" width="2" height="1" posx="8" posy="7" type="button">
      <code>
         values.result *= values.in;
values.in = &quot;&quot;;
      </code>
      <value>
         *
      </value>
   </field>
   <field name="div" width="2" height="1" posx="8" posy="8" type="button">
      <code>
         if ( values.in == 0 )
        debug &quot;Division by zero!&quot;;
else
        values.result /= values.in;
values.in = &quot;&quot;;
      </code>
      <value>
         /
      </value>
   </field>
   <field name="b1" width="2" height="1" posx="2" posy="7" type="button">
      <code>
         values.in ~= &quot;1&quot;;
      </code>
      <value>
         1
      </value>
   </field>
   <field name="b2" width="2" height="1" posx="4" posy="7" type="button">
      <code>
         values.in ~= &quot;2&quot;;
      </code>
      <value>
         2
      </value>
   </field>
   <field name="b3" width="2" height="1" posx="6" posy="7" type="button">
      <code>
         values.in ~= &quot;3&quot;;
      </code>
      <value>
         3
      </value>
   </field>
   <field name="b4" width="2" height="1" posx="2" posy="6" type="button">
      <code>
         values.in ~= &quot;4&quot;;
      </code>
      <value>
         4
      </value>
   </field>
   <field name="b5" width="2" height="1" posx="4" posy="6" type="button">
      <code>
         values.in ~= &quot;5&quot;;
      </code>
      <value>
         5
      </value>
   </field>
   <field name="b6" width="2" height="1" posx="6" posy="6" type="button">
      <code>
         values.in ~= &quot;6&quot;;
      </code>
      <value>
         6
      </value>
   </field>
   <field name="b7" width="2" height="1" posx="2" posy="5" type="button">
      <code>
         values.in ~= &quot;7&quot;;
      </code>
      <value>
         7
      </value>
   </field>
   <field name="b8" width="2" height="1" posx="4" posy="5" type="button">
      <code>
         values.in ~= &quot;8&quot;;
      </code>
      <value>
         8
      </value>
   </field>
   <field name="b9" width="2" height="1" posx="6" posy="5" type="button">
      <code>
         values.in ~= &quot;9&quot;;
      </code>
      <value>
         9
      </value>
   </field>
   <field name="b0" width="2" height="1" posx="2" posy="8" type="button">
      <code>
         values.in ~= &quot;0&quot;;
      </code>
      <value>
         0
      </value>
   </field>
   <field name="back" width="4" height="1" posx="4" posy="8" type="button">
      <code>
         values.in =~ s/.$//;
      </code>
      <value>
         Delete
      </value>
   </field>
</wsfdialog>
