






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Students of Computer Science, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Language Features, Web Programming, Server Pages, Visual Basic, Windows Script, Derivatives, Declaration, Operators, Inequality, Loops
Typology: Slides
1 / 11
This page cannot be seen from the preview
Don't miss anything!







VBScript is a subset of the language "Visual Basic forApplications" (VBA).
-^
Included in the Windows Script add-in for Windows9x, NT, and 2000.^ –
http://www.microsoft.com/msdownload/vbscript/scripting.asp
-^
VBA and its derivatives form Microsoft's keylanguage strategy. Learn VB once and you can use itthroughout the Microsoft universe.
-^
VBScript has some annoying differences.
Dim, Const
+, -, *, &, and, or
If, Select, Loops
One per line with a comment after it
-^
'starts a comment
Give good descriptive names
-^
E.g.
Dim TotalSales
not
Dim T
Constants may be declared to centralize a value toone location making both readability andmaintenance easier.
-^
Syntax
Const cPI = 3.
Note that by convention constants should be alluppercase preceded by a scope identifier.
-^
Use constants instead of variable when you can.
In general there are 3 levels of scope.
-^
Local (within a routine)
-^
Object (Covering all routines in an object)
-^
Global (Covering all routines in all objects)
For local scope it is traditional to use all lowercaseor start with lowercase with an uppercase letter inthe middle:
j,
myTitle
, and
moo
are all good local
variables.
Variables and constants can use up to 30alphanumeric characters A-Z, 0-9, and underbar'_'. Do not use any other punctuation.
-^
All variables must start with a letter A-Z.
-^
Declarations are case insensitive. However use ofcase makes your code more readable.
-^
Some editing tools convert your variables to thedeclared case (e.g., VB, InterDev). By typing all inlowercase, your variables/constants will becorrected to the declared case, helping you toidentify errors in typing more easily.
Since variables are variant type (they can containany value) and functions are usually stronglytyped, it is easy to assign a variable incorrectly, adpass it as an argument. This leads to "involuntarytype conversion“—and errors!
-^
Dealing with variants IS the #1 source of errors inVBScript.
-^
VBScript provides a number of conversionfunctions to deal with type issues.