Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Out of memory when using uinteger array (*solved*)
#12
Note: CAST(Uinteger, RND) is *always* 0, because RND returns a float number form 0 to 0.99999999...
So CAST(Uinteger, RND * 3) will return an Uinteger number between 0 and 2 (which is most likely what you want). I used this 2nd form, and your program works ok.

The first ASM chunk you posted corresponds to CAST(Uinteger, RND) * 3 + 1, and won't work.

If you use the 1st one your program will looks like crashed but it is not; it's only generating the same "random" (truncated) numbers once and over again (this should happen both in 1.2.6 and 1.2.8).
Check this and tell me.
---
Boriel
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)