lunes, 10 de diciembre de 2007

Visual Basic lesson 4

In this lesson we'll talk about understanding variables and datatypes, data type conversion and statements and expressions.

A variable is something similar to a X on an equation. Variables represent a space in a computer's memory that is assigned to store a value. The name of the variable is the used in code to reference the value that is stored in this memory space. Declaring a variable is the act of allocating space in the computer's memory. there are many variable types.

we'll create a new project called lesson 04 and we'll insert a button, 2 text boxes and a label and we will write some code for them.

In VB variable declaration must start by Dim. we can at the same time initialize the variable by adding = and then the value.

There are numerical, alphanumerical, and inside this types, there are also lots of sub-types.
We can understand a variable as a bucket, and the value is what is inside the bucket.
We can put into a variable what is in another variable, just by referring it to the variable we want to copy. Is like X=Y.

Explicit data type conversion require the programmer to write code to perform the conversion.
Implicit data type conversions are handled by VB.

and this is the end of lesson 4.... and enough for today....

1 comentario:

Paloma dijo...

Ja ho he comentat en l'entrada anterior