SALINETAS24, the results you get are different from wat you expect because of the STR function, NOT because of the VAL function. Here the syntax:SALINETAS24 wrote: ↑Thu Mar 10, 2022 9:36 am Aquí, por arte de mágia se le añaden espacios en Blanco delante del numero en cuestión,por lo tanto (y esta es mi humilde opinión), no es un problema del GRID, más bien fruto de la función VAL y del tamaño de la cifra.
![]()
https://vivaclipper.wordpress.com/2014/01/19/str/
When you do not pass the second and third parameter of the STR function is does not know how many spaces to return. You can fix this with the alltrim() function.
https://vivaclipper.wordpress.com/2014/01/19/alltrim/
Here your modified code with the expected result:
Code: Select all
cValor="12345678901"
MSGBOX(cValor,LEN(cValor))
nValor:=VAL(cValor)
MSGBOX(nValor,len(alltrim(str(nValor))))