Return a Value at an Address in Memory?
BlitzMax Forums/BlitzMax Programming/Return a Value at an Address in Memory?
| ||
There's varptr, but what does the oppisite. Eg, how do I read a float from a known location in memory. Say, I've got a byte ptr pointing to a constructed type, but how do I read one of the types values (float) from its memory location? Thanks. |
| ||
Edited No, I think I was wrong |
| ||
Float Ptr(address)[0] If its a ptr to a type you could use a Bank |
| ||
Yupp thats the way to go. byte ptr adresses can't be reconstructed to types as their type is not known from some kind of "memory adress" and BM won't allow you to convert it back to an object thus. |