Q&A

  • Undeclared identifier: 'AssingnFile' 멋진오빠들 에러좀
unit U_Pamt;



interface



uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

StdCtrls, Db, DBTables, Grids, DBGrids, ExtCtrls, ShellAPI, Menus, isp3,

Registry, OleCtrls, FileCtrl, inifiles;



{var

s_uip, s_home: string;}



type

TPamt = class(TForm)

Panel1: TPanel;

Stip: TStaticText;

Sthome: TStaticText;

Edip: TEdit;

Edhome: TEdit;

procedure FormCreate(Sender: TObject);

procedure FormClose(Sender: TObject; var Action : TCloseAction);

private

{ Private declarations }

public

{ Public declarations }

end;



var

Pamt: TPamt;



implementation



{$R *.DFM}



procedure TPamt.FormCreate(Sender: TObject);

var

process:string;

commandbuf: array[0..300] of Char;

parambuf: array[0..300] of Char;

senddata: string;

IPini: Tinifile;

FP : Textfile;

begin

IPini :=Tinifile.Create(ExtractFilePath(Application.ExeName)+'portmis.ini');

Edip.Text := IPini.ReadString('IP정보','IP','');

Edhome.Text := IPini.ReadString('IP정보','HOME','');

IPini.Free;

try

[Error ] AssingnFile(FP,'C:TC201PL'+ FormatDateTime('YYYYMM',now)+ '.DAT');

Reset(FP);

process := Edhome.Text +'JJOEFPUT_COMMUNI';

[Error] senddata := Edip.Text + '15564' + Reset(FP);

StrPCopy(commandbuf, process);

StrPCopy(parambuf, senddata);

ShellExeCute(0, nil, commandbuf, parambuf, nil, SW_SHOW);

except

MessageBeep(0);

end;

end;

procedure TPamt.FormClose(Sender: TObject; var Action: TCloseAction);

begin

Close;

end;



end.





[Error] U_Pamt.pas(49): Undeclared identifier: 'AssingnFile'

[Error] U_Pamt.pas(52): Incompatible types: 'String' and 'procedure, untyped pointer or untyped parameter'

[Fatal Error] Project2.dpr(5): Could not compile used unit '기상수신U_Pamt.pas'

에러를 못찾겠는거 있죠...

그래서 짱오빠들의 힘좀 빌릴려구여...

전송하는 프로그램을 만들려구 하거든여...

대충 했는데 될지는 미지수구여....

에러를 다고치면 될까여...???

오빠들 힘좀 써주셔여....

알죠...

좋은 시간만들구여..*^^*

1  COMMENTS
  • Profile
    srookie 2001.10.19 02:23
    안녕하세요.

    그냥 uses에 system이라는 unit만 추가하면 됩니다.

    수정이^^ wrote:

    > unit U_Pamt;

    >

    > interface

    >

    > uses

    > Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

    > StdCtrls, Db, DBTables, Grids, DBGrids, ExtCtrls, ShellAPI, Menus, isp3,

    > Registry, OleCtrls, FileCtrl, inifiles, system;

    ~~~~~~~

    >

    > {var

    > s_uip, s_home: string;}

    >

    > type

    > TPamt = class(TForm)

    > Panel1: TPanel;

    > Stip: TStaticText;

    > Sthome: TStaticText;

    > Edip: TEdit;

    > Edhome: TEdit;

    > procedure FormCreate(Sender: TObject);

    > procedure FormClose(Sender: TObject; var Action : TCloseAction);

    > private

    > { Private declarations }

    > public

    > { Public declarations }

    > end;

    >

    > var

    > Pamt: TPamt;

    >

    > implementation

    >

    > {$R *.DFM}

    >

    > procedure TPamt.FormCreate(Sender: TObject);

    > var

    > process:string;

    > commandbuf: array[0..300] of Char;

    > parambuf: array[0..300] of Char;

    > senddata: string;

    > IPini: Tinifile;

    > FP : Textfile;

    > begin

    > IPini :=Tinifile.Create(ExtractFilePath(Application.ExeName)+'portmis.ini');

    > Edip.Text := IPini.ReadString('IP정보','IP','');

    > Edhome.Text := IPini.ReadString('IP정보','HOME','');

    > IPini.Free;

    > try

    > [Error ] AssingnFile(FP,'C:TC201PL'+ FormatDateTime('YYYYMM',now)+ '.DAT');

    > Reset(FP);

    > process := Edhome.Text +'JJOEFPUT_COMMUNI';

    > [Error] senddata := Edip.Text + '15564' + Reset(FP);

    > StrPCopy(commandbuf, process);

    > StrPCopy(parambuf, senddata);

    > ShellExeCute(0, nil, commandbuf, parambuf, nil, SW_SHOW);

    > except

    > MessageBeep(0);

    > end;

    > end;

    > procedure TPamt.FormClose(Sender: TObject; var Action: TCloseAction);

    > begin

    > Close;

    > end;

    >

    > end.

    >

    >

    > [Error] U_Pamt.pas(49): Undeclared identifier: 'AssingnFile'

    > [Error] U_Pamt.pas(52): Incompatible types: 'String' and 'procedure, untyped pointer or untyped parameter'

    > [Fatal Error] Project2.dpr(5): Could not compile used unit '기상수신U_Pamt.pas'

    > 에러를 못찾겠는거 있죠...

    > 그래서 짱오빠들의 힘좀 빌릴려구여...

    > 전송하는 프로그램을 만들려구 하거든여...

    > 대충 했는데 될지는 미지수구여....

    > 에러를 다고치면 될까여...???

    > 오빠들 힘좀 써주셔여....

    > 알죠...

    > 좋은 시간만들구여..*^^*