The link below may contain answer to your first question:
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/7978ad6ff174273c86256673004a97b0?OpenDocument
I noticed that there is an error in the program; to run it you need to change the line that says
ParamNames(0) = "Arithmetic expression" to
ParamNames(0) = "Arithmetic Expression"