Solved

how to get out the ASC value from delphi

Posted on 2008-06-13
6
1,682 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven plugin not showing after installation 3 72
Custom ckeditor using builder 10 95
Eclipse and java version isssue 2 39
Thread safe  opinion 7 126
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now