Показать сообщение отдельно
  #17  
Старый 17.03.2012, 00:16
deniks deniks вне форума
Прохожий
 
Регистрация: 08.03.2012
Сообщения: 25
Репутация: 10
По умолчанию

попробывал ваш код, норм запустилось, продолжил работу и опять наткнулся на эту же ошибку.

Код:
unit Diagnoz;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Edit2: TEdit;
    Label5: TLabel;
    Edit3: TEdit;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    Edit9: TEdit;
    Edit10: TEdit;
    Edit11: TEdit;
    Edit12: TEdit;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);





  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;



implementation

{$R *.dfm}

type
     MASK = array[1..8192] of real;
     MASKCP = array[1..8192] of real;       {X, Y}
     MASKD = array [1..500] of string;
     mas3 = array[1..50] of real;
     mascpptr = ^maskcp;
var
    S, I, JJ, J, K, MM, MP, M : integer;
    AX, A, F: MASK;
    MPP, TEXT : string;
    DataFile : file;
    AAS : mas3;
    xx : byte;
    X, Y: mascpptr;
    KM, DF : real;
    SS : MASKD;
    KD : longint;
    WOB, TPPR, L, FD, ND, TIP: integer;
    myfile : textfile;
const jjk = 2; FMAX = 11025/2; N = 12;

Procedure SUMGARM(var AX : mask; KN1, KV1 : integer; SYG: real);
    var S : real;
    begin
      S := 0;
      for i := KN1 to KV1 do
        begin
        S := S + sqr(AX[i]);
        end;
      SYG := sqrt(S);
    end;

Procedure MAXGARM(var P : mask; KNN, KVV : integer; MAXGG : integer);
    var
        MAXG, MK, MAX : real;
        IM: integer;
    begin
      MK :=P[KNN];
      IM := KNN;
      MAXG := FMAX * (KM / 2) / K * IM;
        for i := KNN to KVV do
          begin
          if P[i] > MK then
            begin
              MK := P[i];
              IM := I;
              MAXG := FMAX * (KM / 2) / K * IM;
            end;
          end;
        MAXGG := round(MAXG / F[1]);
      end;

procedure TForm1.Button1Click(Sender: TObject);
    var SO, NOM : string;

    ANED : real;
    data,datai : array [1..3] of integer;
    Asr : array [1..10] of integer;
    K : integer;


begin
  SO := Edit1.Text;
  WOB := StrToInt(Edit2.Text);
  TPPR := StrToInt(Edit3.Text);
  ANED := StrToFloat(Edit4.Text);
  L := StrToInt(Edit5.Text);
  FD := StrToInt(Edit6.Text);
  ND := StrToInt(Edit7.Text);
  TIP := StrToInt(Edit9.Text);
  Asr[1] := StrToInt(Edit10.Text);
  data[1] := StrToInt(Edit8.Text);
  data[2] := StrToInt(Edit11.Text);
  data[3] := StrToInt(Edit12.Text);


  Label2.Caption := 'Объект диагностирования:      ' + SO + #13 +
  'Число оборотов в минуту:     ' + IntToStr(WOB)   + #13 +
  'Наработка до ремонта составляет:    ' + IntToStr(TPPR) + '    дней ' + #13 +
  'Предельно допустимый уровень вибраций:    ' + FloatToStr(ANED) + '     мм/с' + #13 +
  'Количество диагностируемых дефектов:    ' + IntToStr(L) + #13 +
  'Частота диагностирования:      ' + IntToStr(FD) + '       Гц' + #13 +
  'Количество датчиков:       ' + IntToStr(ND) + #13 +

  'Дата проведения исходных измерений:    ' + IntToStr(data[1]) + '.' + IntToStr(data[2]) +
  '.' + IntToStr(data[3]) + #13 + 
  'Количество замеров:   ' + IntToStr(TIP) + #13 +
  'Суммарный уровень по датчику (мм/с):    ' + IntToStr(Asr[1]);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  F    : File;
  I, J : Integer;
  XX   : Byte;
begin
  mpp    := '1';
  ss[kd] := '1w';

{$I-}
  AssignFile(F, ss[kd] + mpp + '.wav');
  Reset(F, 1);
  if IOResult = 0 then
  begin
    Seek(F, 50);

    for I := 1 to jjk do
      for J := 1 to 4096 do
      begin
        BlockRead(F, XX, 1);
        X[J] := XX;
      end;
    CloseFile(F);
  end;
{$I+}
end;

end.
Ответить с цитированием