VBSCRIPT BASICS



What is the VBScript?

It is a Scripting language provided by Microsoft.
it is a lightweight edition of the Visual Basic(It is an Microsoft's programming language).
It's functionality is dependent upon either ASP engine or windows scripting host.
VBScript is only supported by internet explorer.

Features of VBScript

  • VBScript is a lightweight scripting language, which has a lightning fast interpreter.
  • VBScript, for the most part, is case insensitive. It has a very simple syntax, easy to learn and to implement.
  • Unlike C++ or Java, VBScript is an object-based scripting language and NOT an Object-Oriented Programming language.
  • It uses Component Object Model (COM) in order to access the elements of the environment in which it is executing.
  • Successful execution of VBScript can happen only if it is executed in Host Environment such as Internet Explorer (IE) ,Internet Information Services (IIS) and Windows Scripting Host (WSH)

Case Sensitivity:

VBScript is a case-insensitive language. This means that language keywords, variables, function names and any other identifiers need NOT be typed with a consistent capitalization of letters.

So identifiers int_counter, INT_Counter and INT_COUNTER have the same meaning within VBScript.

Comments in VBScript

Comments are used to document the program logic and the user information with which other programmers can seamlessly work on the same code in future.

It can include information such as developed by, modified by and it can also include incorporated logic. Comments are ignored by the interpreter while execution.

Comments in VBScript are denoted by two methods.

1. Any statement that starts with a Single Quote (‘) is treated as comment. Following is the example:

<script language="vbscript" type="text/vbscript">
<!—
' This Script is invoked after successful login
' Written by : TutorialsPoint
' Return Value : True / False
//- >
</script>

2. Any statement that starts with the keyword “REM”. Following is the example:

<script language="vbscript" type="text/vbscript">
<!—
REM This Script is written to Validate the Entered Input
REM Modified by : Tutorials point/user2
//- >
</script>

Disadvantages

  • VBscript is used only by IE Browsers. Other browsers such as Chrome, Firefox DONOT Support VBScript. Hence, JavaScript is preferred over VBScript.
  • VBScript has a Limited command line support.
  • Since there is no development environment available by default, debugging is difficult.



No comments:

Post a Comment