Solved

problem with incompatible data types

Posted on 1999-01-02
3
322 Views
Last Modified: 2010-04-04
Hi experts,

I have a problem with this procedure:

procedure TForm1.Button1Click(Sender: TObject);
var
  listitembuffer,colourbuffer: string;
  sl: tstringlist;
begin
  listitembuffer:=sl.strings[i];
  colourbuffer:=colourbuffer+listitembuffer;
  colourbuffer:=TrimColour(colourbuffer);
  edit1.text:=colourbuffer;
end;

The prototype of TrimColour is declared as:

 procedure TrimColour(var master: string);

Unfortunately, in the line

colourbuffer:=TrimColour(colourbuffer);


Delphi says:

"incompatible types "string" and "procedure", untyped pointer or untyped parameter."


Can you please tell me, why this line is not correct?

What must I do in order to copy the result of TrimColour to colourbuffer ?

With kind regards

Mathes

0
Comment
Question by:mathes
[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
3 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1354245
hi mathes

your trimcolour is a procedure not a function
change the line
colourbuffer:=TrimColour(colourbuffer);

to
TrimColour(colourbuffer);

meikl

0
 

Author Comment

by:mathes
ID: 1354246
Dear meikl,

yes, this is the solution. Easy, huh

Oh, I am such a big idiot...

With kind regards

Mathes
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 10 total points
ID: 1354247
hi mathes,

some problems are really easy, but sometimes the simple solution is not seen.

meikl
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 105
Using idhttp to login to instagram 2 118
Print Graphic and Text to Epson TM-T88v 12 465
Problem working with dynamic array - help 2 35
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

749 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