Language Constructs – Variables, Data Types and Arrays

Today was an explanation in formal terms of things that, mostly, you already knew. You already knew them because you have been writing programs in visual basc that use variables, data types and (in the future) arrays.

I ran an example program called agein2020 which had one variable called age of type integer (the picture below shows what the code turns into when run).


We then looked at the different types you could set up:

Integer – positive and negative numbers (e.g. -56, 100, 45)

Single – numbers with a point (e.g. 3.14, 1.4)

String – any combination of words and letters (e.g. “EH10”, “Jamie”)

An array is a set of variables of the same type e.g. dim names(5) as string will create an array with 5 spaces in it.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: