VB Script V B S.

Slides:



Advertisements
Similar presentations
Chapter 41 Variables and JSP Control Structures JavaServer Pages By Xue Bai.
Advertisements

Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
CIS 375—Web App Dev II VBScript. 2 Introduction to VBScript VBScript is a light version of MS’s ____________. Example: document.write("Hello from VBScript!")
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 8: JavaScript I.
JavaScript, Third Edition
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
COMPUTER PROGRAMMING II SUMMER 2011 Visual Basic to C#
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
2440: 211 Interactive Web Programming Expressions & Operators.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
Dani Vainstein1 VBScript Session 1. Dani Vainstein2 Subjets for Session 1 Vbscript fundamentals. Variant subtypes. Variables. Option Explicit statement.
Introduction to VB.NET 2005 Dr. McDaniel IDS4704 Spring 2005.
VBScript. Introduction Visual Basic scripting language is client side scripting language. It is developed by Microsoft VBScript is subset of VB language.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
COMPUTER PROGRAMMING II SUMMER 2011 Visual Basic to C#
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
XP Tutorial 8 Adding Interactivity with ActionScript.
VARIABLES, CONSTANTS, OPERATORS ANS EXPRESSION
1 Scripting Languages VBScript - Recognized mainly by Internet Explorer only - Netscape does have a plug-in JavaScript - Recognized by Internet Explorer.
VBScript Conditional Statements. Conditional Statements Very often when you write code, you want to perform different actions for different decisions.
Controlling Program Flow with Decision Structures.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Creation of Variables with Numeric, alphanumeric, date, picture, memo data types Constant - A quantity that does not change during the execution of a program.
CSET 3250 Client-Side Scripting VBScript : Operators, Control Structures, Procedures and Functions.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
JavaScript Tutorial. What is JavaScript JavaScript is the programming language of HTML and the Web Programming makes computers do what you want them to.
Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.
Welcome to Computer Programming II! Computer Programming II Summer 2015.
Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this.
>> Introduction to JavaScript
VBScript Session 1 Dani Vainstein.
VBA - Excel VBA is Visual Basic for Applications
VBA - Excel VBA is Visual Basic for Applications
VBScript Session 1 IT Professional Academy.
An Application Uses Variables to Hold Information So It May Be Manipulated, Used to Manipulate Other Information, or Remembered for Later Use.
Visual Basic 6 (VB6) Data Types, And Operators
My First Web Page document.write("" + Date() + ""); To insert.
JavaScript Syntax and Semantics
Development of Internet Application 1501CT - Sara Almudauh
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Method.
2. Understanding VB Variables
JavaScript: Functions.
PHP Introduction.
Arrays, For loop While loop Do while loop
Chapter 6 Variables What is VBScript?
Data Types, Identifiers, and Expressions
WEB PROGRAMMING JavaScript.
PHP.
Logical Operations In Matlab.
Python Primer 1: Types and Operators
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
ICT Gaming Lesson 3.
Intro to Programming Concepts
CS 240 – Lecture 7 Boolean Operations, Increment and Decrement Operators, Constant Types, enum Types, Precedence.
JavaScript CS 4640 Programming Languages for Web Applications
Tutorial 10: Programming with javascript
VBScript Session 1.
Quick Test Professional Training Part 1
CIS 136 Building Mobile Apps
Introduction to Computer Programming IT-104
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

VB Script V B S

VB Scripting Basics B S V VBScript stands for Visual Basic Scripting, is a scripting language was launched by Microsoft in1996. VB Scripting language is a lightweight programming language. VBScript can be used to write both client-side and server-side scripting. VBScript is a light version of Microsoft's programming language Visual Basic VBScript is only supported by Microsoft's browsers (Internet Explorer) V B S

Data Types VBScript supports only one data type called ‘Variant’. The variant data type is a special kind of data type that can contain different kinds of information. It is the default data type returned by all functions in VB Script. A variant behaves as a number when it is used in a numeric context and as a string when used in a string context. V B S

VB Script Variables B S V A variable is a "container" /Placeholder that refers to a memory location, that stores program information that may change at run time. As with algebra, VBScript variables are used to hold values or expressions. A variable can have a short name, like x, or a more descriptive name, like carname. V B S

Rules for VBScript variable names Must begin with a letter  Cannot contain a period (.) Cannot exceed 255 characters In VB Script, all variables are variant data type, that can store different types of data. V B S

Declaring (Creating) VBScript Variables Creating variables in VBScript is most often referred to as "declaring" variables. You can declare VBScript variables with the Dim, Public or the Private statement. Like this: - Dim x - Dim carname V B S

VB Script Array Variables An array variable is used to store multiple values in a single variable. In the following example, an array containing 3 elements is declared: Ex: Dim names(2) The number shown in the parentheses is 2. We start at zero so this array contains 3 elements. This is a fixed-size array. You assign data to each of the elements of the array like this: names(0)="Tove“ names(1)="Jani" names(2)="Stale" V B S

VB Script has two kinds procedures: VB Script Procedures Ex: Sub kumar() msgbox "kumar" End Sub kumar() VB Script has two kinds procedures: 1.) Sub procedure 2.) Function procedure 1.) Sub procedure: Sub procedure is a series of statements, enclosed by the Sub and End Sub statements can perform actions, but does not return a value can take arguments. V B S

VBScript Function Procedures Ex: function myfunction()   myfunction=Date() end function Is a series of statements, enclosed by the Function and End Function statements. Can perform actions and can return a value. Can take arguments that are passed to it by a calling procedure. Without arguments, must include an empty set of parentheses (). Returns a value by assigning a value to its name.

Conditional Statements Conditional statements are used to perform different actions for different decisions. In VBScript we have four conditional statements: If statement - executes a set of code when a condition is true If...Then...Else statement - select one of two sets of lines to execute If...Then...ElseIf statement - select one of many sets of lines to execute Select Case statement - select one of many sets of lines to execute V B S

If...Then...Else Use the If...Then...Else statement if you want to Execute some code if a condition is true Select one of two blocks of code to execute If you want to execute only one statement when a condition is true, you can write the code on one line: Ex: Function greeting() i=hour(time) msgbox i If i < 10 Then msgbox "Good morning!" Else msgbox "Have a nice day!" End If End Function greeting() V B S

Select Case You can also use the "Select Case" statement if you want to select one of many blocks of code to execute: Select Case d   Case 1    msgbox "Sleepy Sunday"   Case 2     .write("Monday again!")   Case 3     document.write("Just Tuesday!")   Case 4     document.write("Wednesday!")   Case 5     document.write("Thursday...")   Case 6     document.write("Finally Friday!")   Case else     document.write("Super Saturday!!!!") End Select V B S

VB Script Operators B S V Operators are used to "do operations" or manipulate variables and values. For example, addition is an example of a mathematical operator and concatenation is an example of a string operator. The plus sign "+" is the operator used in programming language to represent this mathematical addition operation. V B S

Math Operators When you want to perform addition, subtraction, multiplication, and other mathematical operations on numbers and variables use the operators listed below. V B S

B S Comparison Operators Comparison Operators V When you want to compare two numbers to see which is bigger, if they're equal, or some other type of relationship use the comparison operators listed below. Common uses of comparison operators are within conditional statements like an If Statement or the condition check in a While Loop. V B S

Logical operators B S manipulate and create logical Logic operators are used to manipulate and create logical statements. For example if you wanted a variable shoeSize to be equal to 10 or 11 then you would do something like: V B S

String Concatenation Operator When you have various strings that you would like to combine into one string use the concatenation operator. V B S

THANK YOU ! B S Any questions? You can find us at queries@thesisscientist.com V B S