FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour control a string
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

control a string

Posted: Wed Sep 19, 2018 07:27 PM

I have two type of string
sample "5TC" "FIS" "PAL"
how I can make to control the first letter is a Number or Alphabetic ?

I tried with IIF( IsAlNum( Left(cClasse,1) ),"N","L")
but not run

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: control a string

Posted: Wed Sep 19, 2018 07:49 PM
Also try with

Code (fw): Select all Collapse
? Val( Left( "5TC", 1 ) ),  Val( Left( "FIS", 1 ) )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: control a string

Posted: Wed Sep 19, 2018 08:26 PM
Code (fw): Select all Collapse
? ISDIGIT( cClasse )


EMG
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: control a string

Posted: Wed Sep 19, 2018 09:08 PM

Thanks enrico now run

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion