Searching for it for approximately one day and finding nothing, I decided to
write my own function for converting strings to numeric values. Below is the
function for it:
var stringToNum = func (str) {
var boyut = size(str);
var pointLoc = boyut;
var value = 0;
var i = 0;
for(var k=0; k<boyut; k+=1)
if (str[k]==46) pointLoc = k;
for (; i<pointLoc; i+=1) {
value += (str[i]-48) * math.pow(10,pointLoc-i-1);
}
i+=1;
value = int(value);
for (var j = 1; i<boyut; i+=1) {
value += (str[i]-48) * math.pow(10,-j);
j+=1;
}
return value;
}
It would still be good to know if any built-in method does this too :)
Greetings
2009/9/5 Behlül UÇAR <ucarbeh...@gmail.com>
> Is it possible to find detailed information for each method of Node object
> which is in $FG_ROOT/Nasal/props.nas file.
>
> Actually my problem as follows: I'm taking input from an input box and i
> assign it to a property. I want it to be a numeric value (double for
> example) but it's always a string. I've tried everything and looked
> everywhere but couldn't find how to do it.
>
> Because of this shorthandness, at later steps I get NaN errors. I try to
> make some calculations and naturally I can not do since they are strings
>
> Any help would be very appreciated!
>
> Greetings
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel