> Hi
>  
> I want to fill the array with random values from 0 to 1000, but not sure
> what I'am making wrong with the std libs :

First, you don't need to use set_seed, it's done automaticaly.
Then a more readable example would be :

var values = $amake(5000);
var i = 0;
var make_rnd = $loader.loadprim("[EMAIL PROTECTED]",0);
var rint = $loader.loadprim("[EMAIL PROTECTED]",2);
var r = make_rnd();

while( i < 5000 ) {
    values[i] = rint(r,1000);
    i += 1;
}

$print(values);

The difference with your program is that in Neko array indexes starts
from 0 and not from 1 (like in C or Java for example).

Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to