Fixed. It was not a problem with parseInt method. It was a problem with
print() operation in jaggery. Even if I run "print(1)" it prints "1.0".
Easy fix is to enter print(i+"") instead print(i) which converts the
integer into a string.

Thanks
Dimuthu


On Sun, Feb 9, 2014 at 5:23 PM, Dimuthu Upeksha <[email protected]> wrote:

> Hi all,
> In this simple jaggery code
>
> for(var i=0;i<10;i++){
>
> print(i);
>
> print("<br/>");
>
> }
>
> Output was like
>
> 0.0
>
> 1.0
>
> ....
>
> I need to parse these outputs into integer. I tried parseInt(i) method but
> it also gave the same result. What could be the reason for that?
>
> Thanks
>
> Dimuthu
>
> --
> Dimuthu Upeksha
> Engineering Intern
> WSO2 inc.
>



-- 
Dimuthu Upeksha
Engineering Intern
WSO2 inc.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to