Autor Beitrag
Die Brotmafia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110

Win XP Suse Linux 9.3
Delphi 7 Enterprise, Delphi 2005
BeitragVerfasst: Mo 02.01.06 15:05 
Also, ich würde gerne von einer Varialbe, die z.b. "MeineVariable" heißt, auslesen, wie viele Buchstaben sie hat, in dem Fall wären es jetzt z.b. 13.

Danke!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 02.01.06 15:07 
Moin!

Length eintippen und F1 drücken, danach Gehirn einschalten... :roll: :wink:

Ähm, Moment, :gruebel: willst du jetzt wissen, wieveiel Buchstaben der Variablen-Name hat, oder der Inhalt?

cu
Narses
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 02.01.06 15:10 
Hallo,

Wenn er das meint, was ich denke, ist die Antwort aber ein bisschen komplizierter, Narses ;)

Im Allgemeinen: Vergiss es, das geht nicht, da die Namen der Variablen lediglich zur Orientierung für den Programmierer gut sind. Nach dem Compilieren sind sie weg und alle Variablen sind nur noch Speicheradressen... Man könnte höchstens was über TypInfo machen, wenn es sich dabei um eine Property handelt...

Gruß,
raziel

_________________
JSXGraph
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 02.01.06 15:21 
Moin!

user profile iconraziel hat folgendes geschrieben:
Wenn er das meint, was ich denke, ist die Antwort aber ein bisschen komplizierter, Narses ;)

Schon klar, deshalb hatte ich das ja auch offensichtlich bereits als "absurd" abgetan... :wink:

cu
Narses
Die Brotmafia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110

Win XP Suse Linux 9.3
Delphi 7 Enterprise, Delphi 2005
BeitragVerfasst: Mo 02.01.06 15:34 
ALso, die Variable ist ein String, der meistens so zwischen 4 und 12 Buchstaben hat, ich würde gerne auslesen lassen wie viele buchstaben dieser String hat.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mo 02.01.06 15:36 
:shock: meinst du length()?

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Die Brotmafia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110

Win XP Suse Linux 9.3
Delphi 7 Enterprise, Delphi 2005
BeitragVerfasst: Mo 02.01.06 15:48 
Oha, ich meinte sogar Length...



Ich depp....