Hello,
can you help me please?
I have to find out if a character variable inside is alphanumeric or numeric.
Is there an easy command, that I can use?
Thank you in advance, kind regards
Iris
alphanumeric vs. numeric
Re: alphanumeric vs. numeric
Hallo Iris,
Msgalert( VAL( "aaa" ) ) = 0
Msgalert( VAL( "111" ) ) = 111
best regards
Uwe
VAL returns the info You are looking forI have to find out if a character variable inside is alphanumeric or numeric.
Msgalert( VAL( "aaa" ) ) = 0
Msgalert( VAL( "111" ) ) = 111
best regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Iris Gesser
- Posts: 32
- Joined: Fri Apr 22, 2016 10:19 pm
Re: alphanumeric vs. numeric
Hello Uwe,
thank you for your answer.
I have tried with VAL, but this is not the solution.
local cNumber = "1S2673Z"
msginfo(VAL(cNumber)) = 1
I think VAL evaluates cNumber until the first non-numeric character.
Thank you and kind regards
Iris
thank you for your answer.
I have tried with VAL, but this is not the solution.
local cNumber = "1S2673Z"
msginfo(VAL(cNumber)) = 1
I think VAL evaluates cNumber until the first non-numeric character.
Thank you and kind regards
Iris
Re: alphanumeric vs. numeric
cVar:="a5b"
posrange(chr(48), chr(57), cVar) - 2
posrange(chr(48), chr(57), cVar) - 2
Re: alphanumeric vs. numeric
Try with
Code: Select all
? hb_IsNumeric( <var> )
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Iris Gesser
- Posts: 32
- Joined: Fri Apr 22, 2016 10:19 pm
Re: alphanumeric vs. numeric
Thank you very much, this is wotking fine!
Kind regards
Iris
Kind regards
Iris