Jump to content

Recommended Posts

Posted

Visual Basic Language Concepts

The Basics: How Programming Works

 

Before you jump in and start learning the Visual Basic programming language, it may help you to understand what a programming language is and how it works, including some programming terminology. The best place to start is with the basics.

 

How Programming Works

On its own, a computer isn't very smart.

 

A computer is essentially just a big bunch of tiny electronic switches that are either on or off. By setting different combinations of these switches, you can make the computer do something, for example, display something on the screen or make a sound. That's what programming is at its most basic—telling a computer what to do.

 

Of course, understanding which combination of switches will make the computer do what you want would be a daunting task—that's where programming languages come in.

 

What is A Programming Language?

People express themselves using a language with many words. Computers use a simple language consisting of only 1s and 0s, with a 1 meaning "on" and a 0 meaning "off." Trying to talk to a computer in its own language would be like trying to talk to your friends using Morse code—it can be done, but why would you?

 

A programming language acts as a translator between you and the computer. Rather than learning the computer's native language (known as machine language), you can use a programming language to instruct the computer in a way that is easier to learn and understand.

 

A specialized program known as a compiler takes the instructions written in the programming language and converts them to machine language. This means that as a Visual Basic programmer, you don't need to understand what the computer is doing or how it does it, you just need to understand how the Visual Basic programming language works.

 

Inside the Visual Basic Language

In many ways, Visual Basic is a lot like the language that you use every day. When you speak or write, you use different types of words, such as nouns or verbs, which define how they are used. Visual Basic also has different types of words known as programming elements that define how they are used to write programs.

 

Programming elements in Visual Basic include statements, declarations, methods, operators, and keywords. As you complete the following lessons, you will learn more about these elements and how to use them.

 

Written and spoken language also has rules, or syntax, that defines the order of words in a sentence. Visual Basic also has syntax—at first it may look strange, but it is actually very simple. For example, to state "The maximum speed of my car is 55", you would write:

 

Car.Speed.Maximum = 55

 

You will learn more about syntax later, and tools in Visual Basic such as IntelliSense provide you with guidance in using the correct syntax when writing programs.

 

The language you write and speak also has structure: for example, a book has chapters with paragraphs that contain sentences. Programs written in Visual Basic also have a structure: modules are like chapters, procedures are like paragraphs, and lines of code are like sentences.

 

That's all.I hope i helped you.

 

Regards,

 

Poon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...