[fpc-pascal]A questions about delphi and pascal

Florian Klaempfl Florian.Klaempfl at gmx.de
Sat Apr 26 10:30:41 CEST 2003


Ramom Flores d'as Seixas wrote:
> Hello:
> 
>    I would like to write mex[1] files in pascal, so I would like to adapt the 
> DelphiMex[2] library from delphi to pascal. But I don't know Delphi, so I 
> would thanks if somebody can help me. At this moment I have the following 
> dude, in the cited library the autor wrote the following procedure:
> 
> 692 procedure DelphiMexInitIO;
> 693   begin
> 694     with TTextRec(Output) do
> 695      begin
> 696        Mode := fmoutput;
> .             BufSize   := sizeof(Buffer)-1;  { Leave a space to pad with #0 }
> .             BufPtr    := @Buffer;
> .            OpenFunc  := @MATLABOC;
>              InOutFunc := @MATLABOUT;
>              FlushFunc := @MATLABOUT;
>              CloseFunc := @MATLABOC;
>              Name[0]   := #0;
>          end;
>       end;
> 
> The variable "Output" has not been previously declared, so when I try to 
> compile fpc outputs the following message
> 
> pascalmex.pas(694,12) Error: Illegal type conversion
> pascalmex.pas(696,10) Error: Identifier not found MODE
> 

Which compiler and os do you use? Did you try
with systuils.TTextRec(Output) do
in line 694?




More information about the fpc-pascal mailing list