method CorrectIsoDate(const Datum : System.String; var Jahr: System.String) : System.String; public;
implementation
method CorrectIsoDate(const Datum : System.String; var Jahr: System.String) : System.String;
begin
result := String.Empty;
Jahr := String.Empty;
if not String.IsNullOrEmpty(Datum) then begin
var splitdate := Datum.split(’-’);
if (splitdate.Length = 3) then begin
Jahr := splitdate[0];
var Monat := splitdate[1];
var Tag := splitdate[2];
if (Tag = ‘00’) and (Monat = ‘00’) then begin
Tag := ‘30’;
Monat := ‘06’;
end
else begin
if (Tag = ‘00’) then
Tag := ‘15’;
if (Monat = ‘00’) then
Monat := ‘06’;
end;
exit Jahr + ‘-’ + Monat + ‘-’ + Tag;
end;
end;
end;
Webapplication, .NET Version 4.5.2, Oxygene 10.0.0.2425
Hmm,. so there’s only one CorrectIsoDate, but it still gives ambiguous overload? Are there any additional messages? can we get a complete test case?
i pasted this into a new project and it compiles clean after fixing broken quit chars and adding the top/bottom
namespace foo;
interface
uses
System,
System.Collections.Generic,
System.Web,
System.Text;
method CorrectIsoDate(const Datum : System.String; var Jahr: System.String) : System.String; public;
implementation
method CorrectIsoDate(const Datum : System.String; var Jahr: System.String) : System.String;
begin
result := String.Empty;
Jahr := String.Empty;
if not String.IsNullOrEmpty(Datum) then begin
var splitdate := Datum.split('-');
if (splitdate.Length = 3) then begin
Jahr := splitdate[0];
var Monat := splitdate[1];
var Tag := splitdate[2];
if (Tag = '00') and (Monat = '00') then begin
Tag := '30';
Monat := '06';
end
else begin
if (Tag = '00') then
Tag := '15';
if (Monat = '00') then
Monat := '06';
end;
exit Jahr + '-' + Monat + '-' + Tag;
end;
end;
end;
end.
an actually complete project or code file that compiles (well, except for the error) would really be helpful, coz otherwise I’m just guessing and throwing random code snippets at the compiler in a (usually futile) attempt to reproduce…
Can you extract the methods you call, and the call to it? There’s probably more than 1 CorrectIsoDate, and the types of the parameters involved should allow is to reproduce this issue. (the body of the methods can be empty)
Any chance you could attach a second copy of Visual Studio as debugger and see if you can get a call stack on what it is stuck on? Does it hang indefinitely, or is it just slow (ie recovers after a few (or many) seconds)?
sometimes slow (Qeue is busy) sometimes hanging indefinitely.
I am for two weeks in holiday now without PC
So I am coming back to you if I encounter this problem after my holidays again.
Thanks for your good support