Paer Toernell
asked on
how to get out the ASC value from delphi
I want to write something like
var
s : string;
begin
s:= 'abc';
if asc(s)>30 then...{if s is space or higher...}
but its not asc, what is it?
var
s : string;
begin
s:= 'abc';
if asc(s)>30 then...{if s is space or higher...}
but its not asc, what is it?
Byte(s)
ASKER
Not Ord(s) ?
Both will work the same way on Char types. Ord will work on any ordinal data type.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good point ciuly, I had overlooked that s was a string, not s char.
don't forget to check if the string is not empty :)