VBScript Syntax Tutorial
Far from a complete guide, this is intended to be an introduction for programmers who are used to Java, Javascript, or C. The aspects of programming that are different from those languages will be emphasized.
…
The Basics:
Nothing in VBscript is case sensitive. Use the apostrophe for comments:
‘This is a comment
myint = 5 ‘The compiler will also ignore the comment on the end of this line
…
Variable names:
Variables can contain numbers, letters, underscores, dashes, pretty much what you would expect. They must begin with a letter. The syntax for declaring a variable is:
Dim variablename
You do not have to explicitly declare your variables unless you include the keyword Option Explicit in your code. Explicit declaration makes debugging easier because the compiler will generate errors if you misspell a variable name.
As with most script languages, VBscript is loosely typed. This means that variables do not have a type specified, and will hold whatever type (string, integer, float, object). If you assign a string to a variable, then assign an integer or an object later on, the compiler will not complain.
…
Website: www.jdray.net | Filesize: 20kb
No of Page(s): 6
Click here to download VBScript Syntax Tutorial.
Related Tutorial
Tags: tutorial scripting, vbscript
Comments
Leave a Reply