Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Programming languages > Lower case and isalpaha
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 19th October 01:59
tc
External User
 
Posts: 1
Default Lower case and isalpaha



Hi,
there is a function that make lowercase of char or string?
And there is a standard function that return true/false if char is a
character?
  Reply With Quote


  sponsored links


2 19th October 01:59
chuck f
External User
 
Posts: 1
Default Lower case and isalpaha



There is no guarantee in Pascal that alphabetical characters are
continuous. You need to enumerate all the possible chars.


Again, the same comment applies. You would be better advised to
create and initialize two sets, one consisting of the enumerated
upper case chars, and another for the lower case ones. Then the
isalpha can refer to the set lowers + uppers.

Also, since there is no guarantee of any numeric relationship
between the corresponding lower and upper case characters, you
probably need some ******** arrays of char for the conversion.

Your solutions will work only for the limited conditions of Ascii
coding, with no allowance for such things as Swedish, German, etc.
characters.

--
Read about the Sony stealthware that is a security leak, phones
home, and is generally illegal in most parts of the world. Also
the apparent connivance of the various security software firms.
http://www.schneier.com/blog/archives/2005/11/sonys_drm_rootk.html
  Reply With Quote
3 27th October 07:59
chuck f
External User
 
Posts: 1
Default Lower case and isalpaha


There is no guarantee in Pascal that alphabetical characters are
continuous. You need to enumerate all the possible chars.


Again, the same comment applies. You would be better advised to
create and initialize two sets, one consisting of the enumerated
upper case chars, and another for the lower case ones. Then the
isalpha can refer to the set lowers + uppers.

Also, since there is no guarantee of any numeric relationship
between the corresponding lower and upper case characters, you
probably need some ******** arrays of char for the conversion.

Your solutions will work only for the limited conditions of Ascii
coding, with no allowance for such things as Swedish, German, etc.
characters.

--
Read about the Sony stealthware that is a security leak, phones
home, and is generally illegal in most parts of the world. Also
the apparent connivance of the various security software firms.
http://www.schneier.com/blog/archives/2005/11/sonys_drm_rootk.html
  Reply With Quote
4 14th March 03:27
scott moore
External User
 
Posts: 1
Default Lower case and isalpaha


All characters are characters. That's why the're called that.

function isalpha(c: char): boolean;

begin

isalpha := c in ['A'..'Z', 'a'..'z']

end;

function lcase(c: char): char;

begin

if c in ['A'..'Z'] then c := chr(ord(c)-ord('A')+ord('a'));

lcase := c

end;

type string = packed array [1..100];

procedure lcases(var s: string);

var i: integer;

begin

for i := 1 to 100 do s[i] := lcase(s[i])

end;

Enjoy.
  Reply With Quote
5 14th March 03:27
chuck f.
External User
 
Posts: 1
Default Lower case and isalpaha


There is no guarantee in Pascal that alphabetical characters are
continuous. You need to enumerate all the possible chars.


Again, the same comment applies. You would be better advised to
create and initialize two sets, one consisting of the enumerated
upper case chars, and another for the lower case ones. Then the
isalpha can refer to the set lowers + uppers.

Also, since there is no guarantee of any numeric relationship
between the corresponding lower and upper case characters, you
probably need some ******** arrays of char for the conversion.

Your solutions will work only for the limited conditions of Ascii
coding, with no allowance for such things as Swedish, German, etc.
characters.

--
Read about the Sony stealthware that is a security leak, phones
home, and is generally illegal in most parts of the world. Also
the apparent connivance of the various security software firms.
http://www.schneier.com/blog/archives/2005/11/sonys_drm_rootk.html
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666