Hi,

I'm trying to compile REMObject pascal script under FPC + Lazarus (for
GUI classes)
I encounter strange problem.
Pascal script core engine is compiled fine but it crashes on GetRunLine
below.Is this kind of procedural variables supported by FPC :

  CallRunLine := GetRunLine(FOnRunLine,Self.RunLine);  ???

Rebards
Boguslaw Brandys



type
  TMyRunLine = procedure(Self: TPSExec);



function GetRunLine(FOnRunLine: TPSOnLineEvent; meth: TPSRunLine):
TMyRunLine;
begin
  OutputdebugString('Inside GetrunLine');
  if (TMethod(Meth).Code = @TPSExec.RunLine) and (@FOnRunLine = nil) then
    Result := nil
  else
    Result := TMethod(Meth).Code;
end;

(..)

var
FOnrunLine : TMyRunLine;
begin
  CallRunLine := GetRunLine(FOnRunLine,Self.RunLine);
  repeat
    FStatus := isRunning;
//    Cmd := InvalidVal;
    while FStatus = isRunning do
    begin
      if @CallRunLine <> nil then CallRunLine(Self);
      if FCurrentPosition >= FDataLength then
      begin
        CMD_Err(erOutOfRange); // Error
        break;
      end;
//      if cmd <> invalidval then ProfilerExitProc(Cmd+1);

(...)

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to