Overloading

Overloading is where more than one procedure is defined with the same name but different parameters.  The compiler will choose which procedure to call based on the number and type of parameters supplied.

For Example:

Dim c as uByte = "X"

putUSART("Testing")	' Call the procedure with the string parameter
putUSART(c)		' Call the procedure with the uByte parameter




Sub putUSART(s as String)
  puts(s)
End Sub

Sub putUSART(x as uByte) ' Overloads the previous version with a string parameter
  putc(x)
End Sub
 
 

Notes