On Sun, 17 Dec 2017 21:43:45 +0100 Benito van der Zander <ben...@benibela.de> wrote:
> Hi, > > > > > Naturally, any memory pointer operation is not possible in Javascript. > > Code that relies on this will not work. > > > it would be great, if pointers were added. There are pointers already. For example references to class and arrays. It seems you want to emulate pointer of integer. > One trick would be to wrap every variable that is accessed by a pointer > in an array (or object). That would be quite a slow down. Isn't speed the main idea of using pointers? Also what if var and @var are in different units? And what about pointer of pointer? You may want to take a look at asm.js, which has a working model for emulating pointers in JavaScript. It would be possible to add a pas2js target for that. But then again there is webassembly as well and it seems to have better support. Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel