Welcome to the XSharp forum!

Tell us and our members who you are, what you like and why you became a member of this site.
We welcome all new members and hope to see you around a lot!
 Page:1

# TOPIC:

## Why is É between A and Z? (VO and X#) 26 Nov 2020 16:01 #16764

 koeidelix Topic Author Posts: 34 Hello, need help with the following problem. Why is É (201) between A (65) and Z (90)? Local l as Logic Local c as string Local n as dword n := Asc("É") <--201 n := Asc("A") <-- 65 n := Asc("Z") <-- 90 c := "É" l := c >= "A" .and. c <= "Z" <-- is true thank you Thomas Please Log in or Create an account to join the conversation.

## Why is É between A and Z? (VO and X#) 26 Nov 2020 16:39 #16765

 wriedmann Posts: 2482 Hi Thomas, that depends on your nation module (if you are using a nation module) or your system. The German nation module and/or a German language system should sort that between "E" and "F". Wolfgang Wolfgang Riedmann Meran, South Tyrol, Italy www.riedmann.it - docs.xsharp.it Please Log in or Create an account to join the conversation.

## Why is É between A and Z? (VO and X#) 26 Nov 2020 16:51 #16766

 koeidelix Topic Author Posts: 34 Hi Wolfgang, thanks for the explanation. I only want to allow the letters "A" to "Z". Do I have to check the Asc() values. Is that enough? Or better look for a .Net-Method? Thomas Please Log in or Create an account to join the conversation.

## Why is É between A and Z? (VO and X#) 26 Nov 2020 17:26 #16767

 wriedmann Posts: 2482 Hi Thomas, if you are using the VO runtime, you can use the ASC() function. The Char:IsLetter() method returns true for every valild unicode character. On your string you could use regular expressions:`Regex.IsMatch(hello, @"^[a-zA-Z]+\$")`Source: stackoverflow.com/questions/12884610/how...y-letter-from-a-to-z Wolfgang Wolfgang Riedmann Meran, South Tyrol, Italy www.riedmann.it - docs.xsharp.it Please Log in or Create an account to join the conversation.

## Why is É between A and Z? (VO and X#) 26 Nov 2020 17:30 #16768

 koeidelix Topic Author Posts: 34 fine. thank you Wolfgang Please Log in or Create an account to join the conversation.
 Page:1