Hello everyone, I am new to Pascal and I am trying to write a dll that reads lines of text from a text file. I have Assigned the file and path.
When I compile I get the following error...
Error: Incompatible types: got "untyped" expected "AnsiString"the code:
//-----------------
library TestLib;
{$mode objfpc} {$H+}
uses
sysutils, Dialogs;
var
filhand: text;
fPathNam: string;
//--------- ----------------//
function ReadInputFile(): string; stdcall;
var
instring: ansistring;
begin
if not Eof(filhand) then
result := ReadLn(filhand,instring)
//error points to this line else
result := 'EOF';
end;
exports
ReadInputFile;
Can someone please tell me what I am doing wrong.. (I know it's got to be simple
)
Thank you
Chief