IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Custom Routines (VB.Net and ASP Classic Cross Reference Guide)

By Mike Prestwood

VB.Net versus ASP Classic: A side by side comparison between VB.Net and ASP Classic.

 
Language Details
 

Language Details is kind of a catch all for stuff that didn't make it into language basics nor any other category.

Custom Routines

[Other Languages] 

Languages Focus

For non-OOP languages, a custom routine is a function, procedure, or subroutine and for pure OOP languages, a custom routine is a class method. Hybrid languages (both non-OOP and OOP) combine both.

VB.Net:   Sub, Function

VB.Net is a fully OOP language so both Subs and Functions are methods of a class. A Sub does not return a value while a Function does.

Syntax Example:  
Private Sub DoSomething(ByVal pMsg As String)
'...some code.
End Sub

Private Function GetAge(ByVal x As String) As Integer
GetAge = 7
End Function
ASP Classic:   Sub, Function

ASP Classic is a non-OOP language with some OOP features. It offers both Subs and Functions. A Sub does not return a value while a Function does. When Subs and Functions are used in a defined class, they become the methods of the class.

Syntax Example:
Sub SayHello(ByVal pName)
  Response.Write "Hello " + pName + "!<br>"
End Sub
 
Function Add(ByRef pN1, ByRef pN2)
  Add = pN1 + pN2
End Function












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]