Report Bugs Here

Moderator: Mmiscool

User avatar
By kingedem
#52013 serialprint "55555: " & int("1") & "-" & int("2") & "-" & int("10") & chr(13) & chr(10)
Out put : 55555: 2147483648-2147483648-2147483648

serialprint "Hex: " & hex("1") & "-" & hex("2") & "-" & hex("10") & chr(13) & chr(10)
Out put : Hex: 7fffffff-7fffffff-7fffffff
User avatar
By Mmiscool
#52330 The int() function is to return an integer from a value. This means a whole number removing all of the decimals.
It can not be used on a string. To use it on a string you must convert the sstring to a number first using the val() function.
example:
Code: Select allprint int(1.23456)     ' will print 1


example:
Code: Select allprint int(val("2.34567"))     ' will print 2


It looks like you might just be looking for the val function.
User avatar
By Mmiscool
#52358 Post example of code for the return failure.