Solved

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

Posted on 1998-11-13
2
2,581 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
[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
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

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!

Question has a verified solution.

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

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

710 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