Saving pointer values into data types?

Started by Draco9898, June 27, 2006, 06:52:04 AM

Previous topic - Next topic

Draco9898

How would I save the value of a pointer from GetArray() into a data type such as a floating point value? I can't to get it to work.

I'm trying to save it as a floating point value then putting that variable into SetArray.

For example, off the top of my head:

dim WhateverThisis(23)
ThisPointVal#=GetArray(Whateverthisis())
createArray Pointer()
SetArray Pointer(),ThisPointVal#


then SetArray complains it's not a valid memory adress?
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

Draco9898

Oh my bad, it works now, weird... :huh:
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin

You shouldn't store such values in floats.  If the value exceeds 24bit range it'll get corrupted.  32bit Floatings don't have the accuracy.

Draco9898

so, store these memory adresses in what type of varible then?
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin


Draco9898

DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin