LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2005, 06:08 PM   #1
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
kylix - get one char out of TEdit field


My problem is the following:

I have some code here that i want to compile but it wanst written by me so it is pretty confusing to dig in the code for just this tiny change. I need some help with kylix here and my problem is;

I need to extract one char from a TEdit field. The error message i get is [Incompatible types 'Char' and 'WideChar']. How can i get rid of this error? My code is:

ok:=(UpCase(FParams.Name.Text[1])=UpCase(kind-of-element)) and (Length(FParams.Name.Text)<6);

and i am tryingn to get the first char contained in the TEdit field in the form FParams. Something like:

FParams.Name.Text := 'abcdedfghij' and i just want to get one of the letters displayed, say letter "a" using a very reasonable statement(at least for me)

char := FParams.Name.Text[1];

it doesnnt work. My comparaison doesnt work and the code locks in that exact point. Oh, just to help UpCase expects a char as input and so i get the error message. I accept any suggestion as long as it fixes this bug.

Thanks,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kylix program will not run outside Kylix vinsky2002 Programming 3 09-30-2005 11:57 AM
Kylix Program can not be executed outside Kylix vinsky2002 Linux - Software 1 01-10-2005 08:35 AM
C pointers confusion - char ** = char [][] ?? saravkrish Programming 12 12-02-2004 10:06 AM
C Problem---convert char to char* totti10 Programming 11 11-06-2004 11:32 AM
invalid conversion from `char' to `const char* bru Programming 6 05-09-2004 03:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration