If I don't cast then how do I convert this code?
doubleToInts d = runST (
do arr - newDoubleArray (1,2)
writeDoubleArray arr 1 d
i1 - readIntArray arr 1
i2 - readIntArray arr 2
return (i1,i2))
Or can I just read an array of ints from the double array using the
Joel Reymont [EMAIL PROTECTED] writes:
If I don't cast then how do I convert this code?
Uh, what is wrong with divMod?
*Main Data.Word (100::Word64) `divMod` (2^32)
(2,1410065408)
doubleToInts d = runST ( [...]
This will only give you a headache. :-)
-k
--
If I haven't seen
joel reymont wrote:
I don't understand the syntax needed to create a new double or float
array with newArray from Data.Array.MArray. I also don't yet
understand how to cast that double array to read ints from it.
doubleToInts d = runST (
do arr - newDoubleArray (1,2)
Joel Reymont [EMAIL PROTECTED] writes:
I must be missing something because I don't think the code below
converts a double.
Yes, sorry, my bad. I was (and is) confused about what you wanted to
do.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
I'm just trying to replicate the example using the fresh syntax
that does not use readDoubleArray, readIntArray, etc.
On Oct 14, 2005, at 4:32 PM, Ketil Malde wrote:
Yes, sorry, my bad. I was (and is) confused about what you wanted to
do.
--
http://wagerlabs.com/
Folks,
Are there any examples on using STUArray and friends? I'm trying to
convert the following bit of code which uses deprecated features.
I don't understand the syntax needed to create a new double or float
array with newArray from Data.Array.MArray. I also don't yet
understand how to cast
On 10/13/05, joel reymont [EMAIL PROTECTED] wrote:
Folks,
Are there any examples on using STUArray and friends? I'm trying to
convert the following bit of code which uses deprecated features.
I don't understand the syntax needed to create a new double or float
array with newArray from