Language Features - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

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

2012/2013

Uploaded on 07/29/2013

masti
masti 🇮🇳

4.5

(10)

121 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Server-Side Web Programming
with Active Server Pages
VBScript Overview
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Language Features - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Server-Side Web Programming

with Active Server Pages

VBScript Overview

What is VBScript?

•^

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.

Language Features Overview

•^

Declaration^ –

Dim, Const

•^

Operators and Inequality^ –

+, -, *, &, and, or

•^

Decision^ –

If, Select, Loops

•^

Built-in Functions

•^

User defined routines

Declaration - I

•^

All variables in VBScript are of type Variant,e.g., they can assume any value.

•^

Syntax:

Dim myVar

•^

Good nomenclature and style^ –

One per line with a comment after it

-^

'starts a comment

Give good descriptive names

-^

E.g.

Dim TotalSales

not

Dim T

Declaration - III

•^

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.

Declaration - IV

•^

Scope identifiers^ –

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.

Declaration - VI

•^

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.

Declaration - VII

•^

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.