İki parçalı ufak bir sorum olacak;
( Tek seferde 10 Puan verme imkanım yok fakat, soruyu doğru cevaplayan herkesin farklı yorumlarına toplamda 10'ar rep puanı verebilirim...

)
1) Bazı fonksiyon ve prosedürlerde geçen ve parametrenin veri tipi olarak belirtilen "Array of Const" tipindeki parametreleri bir string değişkeninde araya ";" karakteri ekleyerek arka arkaya nasıl toplayabiliriz?
2) "Array of const" aslında hangi veri tipidir...
İşinizi biraz daha kolayklaştıralım;
function ArrayOfConstToString(const Argumanlar: Array of Const): String;
begin
// ...
// Buraya ne yazılmalı?
// ...
end;
Örnek olması açısından
ShowMessage ( ArrayOfConstToString( [ 1.1, now, 'Ali Kemal', '', 55 ] ) );
beklenen çıktı;
"1.1;18.9.2017 15:10:46;Ali Kemal;55"
Uyarı: Ali Kemal ve 55 arasında " karakteri yer alıyor, yani boş string. Bu boş string sonuç cümlesine eklenmeyecek...
Hatırlatma: Her türlü teknik serbesttir

TVarRect ile ilgili açıklamayı buraya bırakıp devamını arkadaşlara devrediyorum.
Alıntı:TVarRec is used inside a function with an untyped array parameter.
The TVarRec type is used inside a function with a parameter type of array of const in Delphi. In Delphi, the compiler automatically translates each element in the array to a TVarRec value. In C++, the function parameter appears as an array of TVarRec values.
Use TVarRec to work with individual elements of the array when implementing the function that has an array of const parameter.
The VType field indicates the simple type of each TVarRec value. The variable type constants represent the values passed in the tag of the TVarRec structure. These constants, listed below, are defined in the System unit.
Tamamen alıntıdır, daha önce hiç ihtiyacım olmadığı için kullanmamıştım fakat güzel bi olaymış.
function VarRecToStr( AVarRec : TVarRec ) : string;
const
Bool : array[Boolean] of string = ('False', 'True');
begin
case AVarRec.VType of
vtInteger: Result := IntToStr(AVarRec.VInteger);
vtBoolean: Result := Bool[AVarRec.VBoolean];
vtChar: Result := AVarRec.VChar;
vtExtended: Result := FloatToStr(AVarRec.VExtended^);
vtString: Result := AVarRec.VString^;
vtPChar: Result := AVarRec.VPChar;
vtObject: Result := AVarRec.VObject.ClassName;
vtClass: Result := AVarRec.VClass.ClassName;
vtAnsiString: Result := string(AVarRec.VAnsiString);
vtCurrency: Result := CurrToStr(AVarRec.VCurrency^);
vtVariant: Result := string(AVarRec.VVariant^);
{$ifdef Unicode}
vtUnicodeString: Result := UnicodeString(AVarRec.VUnicodeString);
{$endif} vtWideString: Result := WideString(AVarRec.VWideString);
vtWideChar: Result := WideChar(AVarRec.VWideChar);
vtPWideChar: Result := WideChar(AVarRec.VPWideChar^);
else
result := 'TYPE:'+INTTOSTR(AVarRec.VType);
end;
end;
function ArrayOfConstToString(const Argumanlar: Array of Const): String;
var
X : integer;
begin
result := '';
for X := 0 to High(Argumanlar) do begin
result := result + ';' +VarRecToStr( Argumanlar[X] );
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage ( ArrayOfConstToString( [ 1.1, DATETOSTR(now), 'Ali Kemal', '', 55 ] ) );
end;
Önce VarRecToStr fonksiyonu ile gelen değeri string olarak elimize alıyoruz.
function VarRecToStr( AVarRec : TVarRec ) : string;
const
Bool : array[Boolean] of string = ('False', 'True');
begin
case AVarRec.VType of
vtInteger: Result := IntToStr(AVarRec.VInteger);
vtBoolean: Result := Bool[AVarRec.VBoolean];
vtChar: Result := AVarRec.VChar;
vtExtended: Result := FloatToStr(AVarRec.VExtended^);
vtString: Result := AVarRec.VString^;
vtPChar: Result := AVarRec.VPChar;
vtObject: Result := AVarRec.VObject.ClassName;
vtClass: Result := AVarRec.VClass.ClassName;
vtAnsiString: Result := string(AVarRec.VAnsiString);
vtCurrency: Result := CurrToStr(AVarRec.VCurrency^);
vtVariant: Result := string(AVarRec.VVariant^);
else
result := '';
end;
end;
Daha sonra parametreleri yan yana ekliyoruz.
function ArrayOfConstToString( const Argumanlar: Array of Const) : string;
var
i : integer;
begin
result := '';
for i := 0 to High(Argumanlar) do
result := result + ';' + VarRecToStr( Argumanlar[i] );
end;
Bende, tarihi : extended , string i : unicodestring aldı mecburen kodda oynadık acık

Sorudaki uyarıyı ve null değerleri es geçmeyelim arkadaşlar
(18-09-2017, Saat: 16:34)uparlayan Adlı Kullanıcıdan Alıntı: [ -> ]
Sorudaki uyarıyı ve null değerleri es geçmeyelim arkadaşlar
o zamansa;
function ArrayOfConstToString(const Argumanlar: Array of Const): String;
var
X : integer;
begin
result := '';
for X := 0 to High(Argumanlar) do begin
if (VarRecToStr( Argumanlar[X] )<>'') then
result := result + VarRecToStr( Argumanlar[X] ) + ';';
end;
end;

Pardon, benim hatam, örneği şöyle tamamlamış olayım;
ShowMessage ( ArrayOfConstToString( [ 1.1, now, 'Ali Kemal', '', NULL , 55 ] ) );
(18-09-2017, Saat: 15:19)uparlayan Adlı Kullanıcıdan Alıntı: [ -> ]İki parçalı ufak bir sorum olacak;
( Tek seferde 10 Puan verme imkanım yok fakat, soruyu doğru cevaplayan herkesin farklı yorumlarına toplamda 10'ar rep puanı verebilirim...
)
...
Bunu, puanlamadaki bir açık gibi değerlendirelim o zaman.
o zamansa result := 'NULL'
