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

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
KmillerAsked:
Who is Participating?
 
scrapdogConnect With a Mentor Commented:
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
 
jecksomCommented:
var st:string;char_in:char;
begin st[1]:=char_in;end;

??!??!??
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.