FreeBasic Bare Bones: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m Remove reference to newlib that doesn't need to be there
m Fixed mistake: a long does not hold 4 bytes. It holds 8 bytes.
Line 14:
Pointers can be difficult to understand. Many modern languages do not work with pointers, while if you know a language like C, C++ or Assembly, you will probably know what they do. Since you will need to use them, a quick introduction in how they work in FreeBasic.
 
The computer uses a set of registers, and memory. Memory is divided into bytes, each byte has its own location number. Big numbers, strings, types and arrays use up multiple bytes. These bytes are stored next to each other. A Long will hold 48 bytes, and will for example occupy locations 239394, 239395, 239396 and, 239397, 239398, 239399, 239400, 239401. In the computer, these location numbers are called addresses (like the address when sending letters)
 
Pointers hold these location numbers. For bytes, they hold the exact address, for larger objects, it will hold the address of the lowest address (you can determine the other addresses as they will immediately follow the first)