View Full Version : Moving from Delphi/Kylix to Lazarus, Free Pascal

02-01-2005, 12:37 AM

I had a load of trouble with Kylix with my latest SuSE, More trouble than I care to deal with so I've dumped it's Wine Driven bloatedness and installed Lazarus along with Free Pascal.

The IDE is very nice, Very Delphi like. I managed to find my way around without any problems. Setting up my projects seems the same as Delphi. So no probs there.

The only problem I'm having is when I try to compile.

I have a TStringlist and I'm using the GetCount() function to determine the nuber of items.

Trouble is when I say if GetCount() > 0 , it gives an error "Incompatible types: got "TStringList.GetCount:LongInt" expected "LongInt"

This is obviously a newbie problem, can anyone give me a clue so I can fix this?

This code compiled fine under Kylix on my old Linux partition.


02-01-2005, 06:48 PM
TStringList.GetCount is a protected function should be used only internally. You can use TStringList.Count to get the same results.

02-01-2005, 09:41 PM
You are a complete genius. That was the problem. Changing to Count instead of GetCount fixed that particular compilation problem. I don't recall why I'd used GetCount in the first place now.

Told you it was a newbie question :)

Many Thanks.

05-01-2005, 05:26 PM
fpc sometimes gives f*cked up error messages.