Solved

Incompatible types: 'Char' and 'String'??

Posted on 1998-11-13
2
2,464 Views
Last Modified: 2012-06-21
I have a function that needs a single letter passed to it(Char). This letter is the first letter in a string from another component. How do I convert the first letter of a string into the type Char?

Thanks
0
Comment
Question by:Kmiller
2 Comments
 
LVL 5

Accepted Solution

by:
scrapdog earned 50 total points
ID: 1346722
Given:

var s :string[50];  {or any size string}
    c :char;


c := s[1];  

will transfer the first letter of string s into char c.  Pass c (the char) to the function.
0
 
LVL 1

Expert Comment

by:jecksom
ID: 1346723
var st:string;char_in:char;
begin st[1]:=char_in;end;

??!??!??
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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 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