when define the function of object in Delphi.g4. the formalParameterSection and typeDecl are not necessary.but when define the pure function, it's not.
unit FunctionImplementOmitDeclParamAndResult;
interface
function GetShortName(S: WideString): WideString;
implementation
function GetShortName;
begin
begin
//Result := S;
end;
end;
end.
Maybe, We should use 2 rules for declaration and implementation of the pure procedure(function) and method?
when define the function of object in
Delphi.g4
. the formalParameterSection and typeDecl are not necessary.but when define the pure function, it's not.I think it should like this(And Delphi6 can recognize this style code yet):
test case:
Maybe, We should use 2 rules for declaration and implementation of the pure procedure(function) and method?