Well you should have a closing one for every opening one. If someone put another snippet under yours, it wouldn\'t function properly ;)
Oh and also:
if ($did = 26) { set %sum $asin($did(1)) | did -r calculator 2 | did -a calculator 2 %sum | did -r calculator 1 | did -a calculator 1 Ans }
You can combine switches, so you could make it:
if ($did == 26) { set %sum $asin($did(1)) | did -ra calculator 2 %sum | did -ra calculator 1 Ans }