diff --git a/AutoProcedureTableGenerator.exe b/AutoProcedureTableGenerator.exe index af1f62c..c9d0918 100644 Binary files a/AutoProcedureTableGenerator.exe and b/AutoProcedureTableGenerator.exe differ diff --git a/src/Win32/Debug/AutoProcedureTableGenerator.exe b/src/Win32/Debug/AutoProcedureTableGenerator.exe index af1f62c..c9d0918 100644 Binary files a/src/Win32/Debug/AutoProcedureTableGenerator.exe and b/src/Win32/Debug/AutoProcedureTableGenerator.exe differ diff --git a/src/Win32/Debug/genTable.dcu b/src/Win32/Debug/genTable.dcu index 911a4e4..bc23c86 100644 Binary files a/src/Win32/Debug/genTable.dcu and b/src/Win32/Debug/genTable.dcu differ diff --git a/src/genTable.pas b/src/genTable.pas index fecd128..fd458a8 100644 --- a/src/genTable.pas +++ b/src/genTable.pas @@ -88,19 +88,32 @@ procedure TTableGenForm.btnGenTableClick(Sender: TObject); StringGrid1.Cells[4,0] := 'Назначение параметра'; for I := 0 to memoInpCode.Lines.Count-1 do begin - if pos('implementation', memoInpCode.Lines[i]) > 0 then + if (pos('implementation', AnsiLowerCase(memoInpCode.Lines[i])) > 0) or (pos('$APPTYPE CONSOLE', memoInpCode.Lines[i]) > 0) then begin isOk := true; end; + memoInpCode.Lines[i] := trim(memoInpCode.Lines[i]); b1 := pos('PROCEDURE',AnsiUpperCase(memoInpCode.Lines[i])); - b2 := pos('FUNCTION', memoInpCode.Lines[i]); + b2 := pos('FUNCTION', AnsiUpperCase(memoInpCode.Lines[i])); + if isOk and ( b1 > 0) or (b2 > 0) then - begin + begin curr:= memoInpCode.Lines[i]; - curr := trim(curr); + + if (b1 > 1) or (b2 > 1) then + begin + if b1 = 0 then + k := b2 + else + k := b1; + + if pos('=', curr) < k then + continue; // Процедурный тип + end; + if (pos('(', curr) <> 0) and (pos(')', curr) = 0) then begin k:=1;