Yeah great explaination. Just a little to add, hope it doesn't make it too confusing.
Integers have 4 bytes (you have to use write dword to read and write integers to and from a memblock). Basically you have
write and read byte = 1 byte
write and read word = 2 byte
write and read dword = 4 byte
write and read float = 4 byte
And remember that each byte of data is 1 position in the memblock. The positions numbers start at 0 and inc 1 by each byte of data. So if you had a memblock with 1 byte, 1 word, and 1 float (in that order) you would have to write them like this:
`make memblock memblocknum, size
`size = all the bytes added up (1 + 2 + 4)
make memblock 1, 7
`write memblock byte memblocknum, position, byte
`position = 0 as it is the first byte of data
write memblock byte 1, 0, 254
`position is 1 to 2 as it is the second data and is 2 bytes long
`write memblock word memblocknum, position, word
write memblock word 1, 1, 65534
`position = 3 - 6 as the data before it took up 1 and 2 so the next is 3
`and the data id 4 bytes long.
`write memblock float memblocknum, position, float
write memblock float 1, 3, 1234.56789
`retrieve data the same way you wrote it.
print memblock byte(1,0)
print memblock word(1,1)
print memblock float(1,3)
wait key