Link to home
Start Free TrialLog in
Avatar of Paer Toernell
Paer ToernellFlag for Thailand

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?
Avatar of SteveBay
SteveBay
Flag of United States of America image

Byte(s)
Avatar of Paer Toernell

ASKER

Not Ord(s) ?
Both will work the same way on Char types. Ord will work on any ordinal data type.
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 :)