The problem isn't really visible in your snippet above. But since I got psychic powers, I can still tell what is going on here.
You have a button called sqrt
on your form. Hence, when you write sqrt
in code, it refers to the button, not to the RTL function.
Solution: Write System.Sqrt
instead of Sqrt
(=Self.Sqrt
, the button), or rename the button.