Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   inttostr umwandlungsproblem im stringgrid (https://www.delphipraxis.net/126967-inttostr-umwandlungsproblem-im-stringgrid.html)

Hellraizer 5. Jan 2009 21:08


inttostr umwandlungsproblem im stringgrid
 
hallo,
denke das ist schnell gelöst, komme aber selber grad nich drauf.
vor allem verstehe ich nich warum er einen fehler ausgibt.


Delphi-Quellcode:

   for kd_nr:=1 to 20 do
      with kunde[kd_nr] do
        memo1.Lines.Add('kunde')+[b]inttostr(kd_nr)[/b]+' hat '+                  //inttostr(kd_nr) hab ich doch stehn wieso inkompatibel? var kd_nr=integer
        inttostr(anzahl)+'Rechnun(en) = '+formatfloat('#,##0.00', betrag)+
        ' Euro nicht bezahlt.';
[Error] Offene_Posten1.pas(112): Incompatible types: 'String' and 'Integer' //das dicke ist gemeint

sagt der compiler.

mfg kevin

fkerber 5. Jan 2009 21:12

Re: inttostr umwandlungsproblem im stringgrid
 
Hi!

Ich glaube, mit deinen Klammern stimmt was nicht:


Delphi-Quellcode:

   for kd_nr:=1 to 20 do
      with kunde[kd_nr] do
        memo1.Lines.Add('kunde'+inttostr(kd_nr)+' hat '+
        inttostr(anzahl)+'Rechnung(en) = '+formatfloat('#,##0.00', betrag)+
        ' Euro nicht bezahlt.');

Ciao, Frederic

Hellraizer 5. Jan 2009 21:14

Re: inttostr umwandlungsproblem im stringgrid
 
^^ funktioniert. ich depp xD schon zu spät :D
danke sehr :)
mfg kevin

Helmi 5. Jan 2009 21:30

Re: inttostr umwandlungsproblem im stringgrid
 
für sowas solltest dir mal Delphi-Referenz durchsuchenFormat anschauen


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:45 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz