Le 25/10/2011 21:51, johann Sorel a écrit :
Good evening,
I finally have some time to work with nekovm. The doc is nice, but a few
samples would be even better.
for example, i'm trying to read a file using another lib. so It must be
loaded, but can't find any info for the lib name.
I guess I should obtain something like this :
$loader.loadmodule("???",$loader);
var f = file_open("/.../file.txt", "r");
var s = file_contents(f);
$print(s);
See http://nekovm.org/doc/vm#loaders
You can do :
file_content = $loader.loadprim("std@file_contents",1);
$print(file_content("file.txt"));
$loadmodule is used for loading other .n files and return their $export
object.
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)