Solved

how to get out the ASC value from delphi

Posted on 2008-06-13
6
1,708 Views
Last Modified: 2013-11-23
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?
0
Comment
Question by:Sunsales
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:SteveBay
ID: 21780982
Byte(s)
0
 

Author Comment

by:Sunsales
ID: 21781149
Not Ord(s) ?
0
 
LVL 14

Expert Comment

by:SteveBay
ID: 21781217
Both will work the same way on Char types. Ord will work on any ordinal data type.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Accepted Solution

by:
2266180 earned 500 total points
ID: 21781367
but you cannot do that on s directly as stevebay says. it would be ord(s[1]) for the first character, s[2] for the second, etc
0
 
LVL 14

Expert Comment

by:SteveBay
ID: 21781579
Good point ciuly, I had overlooked that s was a string, not s char.
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 21781808
don't forget to check if the string is not empty :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question