Passing Variables By Value or Reference

Computers & the memory

First of I will explain a detail that you should be aware of in all your work with programming of any kind, and if you already have some basic knowledge about computers and how they work, feel free to skip to the next segment.

I will avoid all the technocratic terms and simply describe in general what actually occur when your program performs the statements that you write.

First of all you assign a variable to hold in memory, the value or text string you work with. You pass this value to the statement to perform an operation. In between this, the computer will store the data in fact in memory on a given available location. This is allocated by the operating system, selecting the next available free space in run time.

Memory addresses are often described as a Memory Address Location. This address is in fact holding a hexadecimal value, in order for your computer to be able to find the data again.

When programming in C or C++ you often talk about pointers. Pointers are simply put, a reference to the memory address location, in order for the program to faster locate and retrieve the data to perform operations with the data.

As you know, there are no pointers in Visual Basic. However, some values and keywords as well as statements may well be written to operate in a very similar way.

Anyone who already knows C or C++ will not be reading this, so they won't be crying crocodile tears as I often refer to something in VB as acting like pointers. *smiles.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup