www.pickatutorial.com Computer Tutorials
Top eBooks: C/C++ | C# | Android | Mathematics | Database | Cloud | Graphics | Networking | Oracle | Hardware | AI
Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script| CSS
Lessons VBScript Strings Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14

In the previous lesson we learned about different VBScript data types.

In this lesson we will learn about a very important VBScript data type i.e. String.

Strings are sequences of alpha-numeric characters. In other words any piece of text is a string.

Like numeric values we can also store strings in VBScript variables. To create a string in VBScript, like many other programming languages, we have to surround it with quotes.

Here is an example:

<script type="text/vbscript">
Dim hw
hw = "Hello World!"
document.write(hw)
</script>

When we run the above code, it would output the following:

Hello World!

VBScript String Concatenation
Often in our VBScript programs we need to join two or more string together. For string concatenation we have a special operator in VBScript i.e. &. We can use the concatenation operator to join string variables or raw string.

Here is an example:

<script type="text/vbscript">
Dim h
Dim w
h = "Hello "
w = "World!"
hw = h & w
document.write(hw)
</script>

Here is the output:

Hello World!

Next >>> Lesson No. 7: VBScript Arrays




Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.