It is a working program in delphi that I ported to lazarus. Using the Tools routines, I converted everything without any problem and everything got converted fine.
I was even able to install the functs component without a problem. However, I had a dusty time doing all of that because for reasons that I do not know, sometimes, the save or saveas or save project or save project as or Open, all terminate, kill, close the program. This will happen for some time and suddenly, they would work again.
I do not know what causes the problem to come on and what causes it to go away.
As if this was not enough, I now have another problem. Below is some sample code and an explanation of the problem.
type
TFuncts = Class(TComponent)
public
procedure breakapart(str: String; ch: Char; var sub: Array of String ; var num: Integer);
The above is the declaration of the procedure in Delphi. It is a Unit with a few very important procedures and functions that I made a component (Functs) with to help me in programming Delphi.
***************************************************************
Below is some of my code that I am using the procedure in, in Lazarus.
procedure TTwoPointResection.Button4Click(Sender: TObject);
var
loaddata: TStrings;
x,indx: Integer;
filename,loadstring: String;
datastrings: Array[0.19] of String;
begin
loaddata := TStringlist.Create;
setlength(datastrings,20);
if opendialog1.Execute then
filename := opendialog1.FileName
else exit;
loaddata.LoadFromFile(filename);
for x := 1 to 4 do begin
loadstring := loaddata.Strings[x-1];
functs1.breakapart(loadstring,',',datastrings,indx);
...
...
...
**********************
When trying to compile, I get this error message when the compiler reaches this line [functs1.breakapart(loadstring,',',datastrings,indx);]
"Got Dynamic Array of AnsiString" expected "Open array of ShortString" This is the only compiler error.
Now this is a component that I have used many many many times in Delphi without any problems. It allows me to break up a string on any character.
lazarus is giving me gray hairs.