Le 20/10/2012 19:19, Konstantin Tcholokachvili a écrit :
Hello,

I'm implementing a tool which trans-compiles (yet not complete) Python
into neko.
I implemented the abs() built-in function in Python, it's supposed to
give the absolute value of a number, for example abs(-30) must give back 30.

So I've done:

var abs = function(n)
{
if (n < 0)
{
return n * -1;

Seems like a bug in the Neko parser, since n * (-1) works well ;)

Will try to fix it for Neko 2.0

Best,
Nicolas


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

Reply via email to