Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi String - TString (https://www.delphipraxis.net/16330-string-tstring.html)

Snooze 15. Feb 2004 15:00

Re: String - TString
 
hm iii ist zu 100% ein String

Delphi-Quellcode:
private
    iii: string;
  public
    { Public declarations }
  end;

Snooze 15. Feb 2004 15:01

Re: String - TString
 
Zitat:

Zitat von fkerber
Hi!

Oder einfach:

Delphi-Quellcode:
DBCombobox1.Items.Add(inttostr(iii));
Ciao fkerber

:oops: gott bin ich langsam


geht nicht

dann schreibt er nähmlich, dass es keine Methode gibt, die dies erlauben würde

fkerber 15. Feb 2004 15:02

Re: String - TString
 
Hi!

Also wenn iii ein Integer ist geht das und sonst dürfte er nicht schreiben, dass es inkompatible Typen sind.

Kannst ja mal das Projekt anhängen.

Ciao fkerber

Snooze 15. Feb 2004 15:09

Re: String - TString
 
so habe mal mit absicht gesagt, dass iii integer ist

Meldung ohne Umwandlung:

incompatible types: 'integer' and 'string'

Meldung mit Umwandlung:

incompatible types: 'tstring' and 'string'

wenn iii String ist

Meldung ohne Umwandlung:

incompatible types: 'tstring' and 'string'

Meldung mit Umwandlung:

there is no overloaded version of 'IntToStr' that can be called with these arguments

Benedikt 15. Feb 2004 15:15

Re: String - TString
 
Zeig doch nochmal deine komplette Codestelle dort, oder häng die Unit mal an, wie fkerber schon sagte.

Snooze 15. Feb 2004 15:17

Re: String - TString
 
Liste der Anhänge anzeigen (Anzahl: 1)
danke

Benedikt 15. Feb 2004 15:23

Re: String - TString
 
Schon ist klar wo der Fehler liegt:

Es darf nicht heißen
DBComboBox1.items:= DBComboBox1.items.add(inttostr(iii));

sondern nur
DBComboBox1.items.add(inttostr(iii));

Außerdem denke ich, muss der Inhalt deiner While-Schleife noch in ein Begin und End, so z.B.

Delphi-Quellcode:
  while i <> ii do
  begin
    iii:= form4.table1['Datum'];
    DBComboBox1.items:= DBComboBox1.items.add(inttostr(iii));
    i:=i+1;
  end;

fkerber 15. Feb 2004 15:24

Re: String - TString
 
HI!

Nur zu Klarheit:
Die Schleife muss so aussehen:

Delphi-Quellcode:
while i <> ii do
  begin
    iii:= form4.table1['Datum'];
    DBComboBox1.items.add(inttostr(iii));
    i:=i+1;
  end;

Da war der Fehler ja noch immer drin @Benedikt.

Ciao fkerber

Snooze 15. Feb 2004 15:25

Re: String - TString
 
danke jetzt klappts. :-D

Benedikt 15. Feb 2004 15:26

Re: String - TString
 
Mist,

erst schreib ich wie es richtig sein soll, und dann in der Schleife vergess ich es zu ändern :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:26 Uhr.
Seite 2 von 2     12   

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