What's wrong if this code, I just want to put a procedure inside of the record:
unit unTEFTipos;
interface
type
TTEFPagamento = record
AcrescimoDesconto: Double;
TrocoSaque: Double;
procedure Clear;
end;
implementation
procedure TTEFPagamento.Clear;
begin
AcrescimoDesconto := 0;
TrocoSaque := 0;
end;
end.
But the Delphi 7 IDE is returning this errors:
Build
[Error] unTEFTipos.pas(10): 'END' expected but 'PROCEDURE' found
[Error] unTEFTipos.pas(11): 'IMPLEMENTATION' expected but ';' found
[Error] unTEFTipos.pas(13): '.' expected but 'IMPLEMENTATION' found
[Error] unTEFTipos.pas(10): Unsatisfied forward or external declaration: 'Clear'
[Fatal Error] GP.dpr(486): Could not compile used unit 'TEF\unTEFTipos.pas'