For example, with code like this:
Public Function Test() As ZString Ptr
Can the round brackets be omitted?
When calling it, which syntax is right?
result = Test vs result = Test()
I come from a language where the round brackets are absolutely required (C++).
Sometimes I saw FB code that simply omit them. So what is the correct syntax? Thanks.
Do the round brackets needed?
Re: Do the round brackets needed?
When calling a function, parentheses surrounding the argument list (if any) are required only for function calls in expressions.
If there is no argument to pass, the parentheses become optional, but it is a common convention to place empty parentheses '()' after the function name, to signify a function call.
On the contrary, a Property in a Type should always be used without parentheses if it has no index parameter.
If there is no argument to pass, the parentheses become optional, but it is a common convention to place empty parentheses '()' after the function name, to signify a function call.
On the contrary, a Property in a Type should always be used without parentheses if it has no index parameter.