vbs: Sub & Function Procedures
First off there are two types of Procedures. Sub Procedures and Function Procedures. One of the main differences is that a Sub Procedure does not return a value whereas a Function Procedure will. I won't bore you to much unnecessary details...
Syntax (Sub Procedure):
Sub ProcedureName(Arg1,Arg2)
script statements
End Sub
Syntax (Function Procedure):
Function ProcedureName(Arg1,Arg2)
script statements
End Function
Let's step through a simple process using both types of procedures (no returning values) stating with a Sub.
Now let's move on to a Function Procedure.
So far everything is working the same. Now let's try returning a value, shall we? This time we will start with a Function Procedure.
Yeah it worked! Now let's try it with a Sub Procedure.
FAIL! Can't do it, won't do it.














Comments [0]