[Gambas-user] String array - problem with val
Tobias Boege
taboege at ...626...
Sat Jul 5 21:29:57 CEST 2014
On Sat, 05 Jul 2014, kungfupanda wrote:
> Hi,
>
> I've a problem with conversion of a string array in integer.
> I'm using gb.chart to create a line graph with a lot of element (more then
> 10.000 value).
> I read the value from a txt file and store all in a string[].
> Now I'm trying to get every element of the string[] (with for each element
> in.... function) and pass every value to Val(element).
>
> But the function val(element), in example Val("0.56") result in NULL.
>
> What's wrong ??
>
Val() uses the current locale to determine, like, the decimal separator. In
some countries you write 0.56 and in others it's 0,56. Do you live in such
a comma country? If yes, the solution is not to use Val() but CInt(). If no,
then show us the code and (an excerpt of) the file you're reading.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list