I am not familiar with VB. As I understand, in c++ at the point of the execution of a return statement within a function, the program exits the function returning that value even if there is more code that can be executed. Is this true in VB
Printable View
I am not familiar with VB. As I understand, in c++ at the point of the execution of a return statement within a function, the program exits the function returning that value even if there is more code that can be executed. Is this true in VB
Hi
Indeed, the C/C++ statement return returns a value and quit the function you're currently in.
In VB, there's nothing compared with that.
Although, there's something close to that......
Exit Function (or Exit Sub)
As soon as you run to this line, the function will end no matter what code is after that.
To return a value from a function, use the functionname as a variable...... MyFunc = ret_val
Hope this helps
Crazy D