Basic Calculator

A simple calculator

{note: trim=left; insert=no; preview=yes; color=none}
{repeat: for c in split(top, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}
{repeat: for c in split(mid, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}
{repeat: for c in split(bottom, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}
{repeat: for c in split(zero, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}
{repeat: for c in split(misc1, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}
{repeat: for c in split(misc2, "|")}{button: text={=concat(text,c)}; label={=c}}{endrepeat}{endnote}
{top="7|8|9"}{mid="4|5|6"}{bottom="1|2|3"}{zero="0|."}{misc1="+|-|*|/"}{misc2="^|(|)"}
{note}{formtext: name=text; default=0; cols=20}{endnote} = {=("() -> " & text)()} {button: text=0; label=Clear}