TerranceN @ Wed Nov 03, 2010 6:03 pm wrote:
"Expression is not a procedure and hence cannot be called"
I don't understand why, but from reading the documentation, they always use Sys.Exec in a if statement, which works properly
Turing enforces the difference between Functions and Procedures. If the method is stated to return a value, you MUST use that value, whether it is by assigning it to a variable, using it in a conditional, etc. It's the same reason turing uses "exit when GUI.ProcessEvent()" instead of just "GUI.ProcessEvent"
This specific method is a function because it returns a value indicating success/failure. I suppose they chose to do that because you're launching something outside of your own program, and will probably want to know if that program was successfully launched or not.