Autor Beitrag
Smartie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Fr 15.04.05 07:52 
Hallo!

Also, wie ich einen String in alles mögliche Konvertier, findet man in jdedem Delphibuch. Und StrToInt is ne super sache. aber, wie konvertier ich ienen String in einen Longinteger???

Wär schön, wenn mir jemand weiter helfen kann.

Lieben Gruß

Smartie
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 15.04.05 08:14 
Da Type Longint = Integer versteh ich die Frage nicht ganz ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mi 20.04.05 14:10 
Gut, dann bin ich wohl von etwas falschem ausgegangen, und stelle eine nun aufgekommene Bestätigungsfrage:

Gibt es einen Unterschied bei Delphi7 zwischen Integer und Longinteger?

Lieben Gruß

Smartie
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Mi 20.04.05 14:37 
user profile iconSmartie hat folgendes geschrieben:
Gibt es einen Unterschied bei Delphi7 zwischen Integer und Longinteger?


wenn es keinen gäbe, dann würde es ja keine zwei verschiendenen namen geben, oder? :roll:
du kannst aber integerzahl = longintegerzahl aufrufen. das ist dann ein typecast, der beim compilieren stattfindet!

_________________
Aus dem Urlaub zurück!
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mi 20.04.05 14:47 
user profile iconScorpionKing hat folgendes geschrieben:
user profile iconSmartie hat folgendes geschrieben:
Gibt es einen Unterschied bei Delphi7 zwischen Integer und Longinteger?


wenn es keinen gäbe, dann würde es ja keine zwei verschiendenen namen geben, oder? :roll:
du kannst aber integerzahl = longintegerzahl aufrufen. das ist dann ein typecast, der beim compilieren stattfindet!


Ich beziehe mich hier auf die Aussage von BenBE. Mir ist bekannt, das Integer (16bit) und Longinteger(32Bit) an sich unterschiedlich sind. Aber, ich MUSS hier etwas in ein long konvertieren, und da sich bei den datentypen unter Delphi seit version 1 auc handerweitig was geändert hat (z.B. beim "neuen" String) frage ich auch diesbezüglich lieber mal nach.

Wen ndie also unter Delphi7 "immer noch" was unterschiedliches darstellen, so bleibt meine alte Frage
Zitat:
wie konvertier ich einen String in einen Longinteger???
doch aktuell.

Lieben Gruß

Smartie
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 20.04.05 14:52 
Delphi-Hilfe:
Generische Integer-Typen für 32-Bit-Implementationen von Delphi
Typ Bereich Format
Integer -2147483648..2147483647 32 Bit, mit Vorzeichen
Cardinal 0..4294967295 32 Bit, ohne Vorzeichen
Zu den fundamentalen Integer-Typen gehören Shortint, Smallint, Longint, Int64, Byte, Word und Longword.

Fundamentale Integer-Typen
Typ Bereich Format
Shortint -128..127 8 Bit, mit Vorzeichen
Smallint -32768..32767 16 Bit, mit Vorzeichen
Longint -2147483648..2147483647 32 Bit, mit Vorzeichen
Int64 -2^63..2^63-1 64 Bit, mit Vorzeichen
Byte 0..255 8 Bit, ohne Vorzeichen
Word 0..65535 16 Bit, ohne Vorzeichen
Longword 0..4294967295 32 Bit, ohne Vorzeichen
...Hat sich dann wohl erledigt, oder? :roll:

_________________
We are, we were and will not be.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 14:53 
Hallo smartie,
ich bin jetzt mal ganz faul und sage: probier es doch einfach aus.
Nimm einen String mit einer Zahl, die die größte Integer Zahl überschreitet. Mache dann ein StrToInt und schau nach was rauskommt.
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mi 20.04.05 15:00 
Dankeschön!

Hab auch inzwischen doch noch folgendes im Netz gefunden, vielleicht intressierts auch jemand anders:

www.mezmedia.de/digi...lung/datentypen.html

Herzlichst Lieben Gruß

Smartie
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mi 20.04.05 16:32 
Und sonst kann man auch immer mit low(...) und high(...) herausfinden, was der Wertebereich ist.
Das geht für Integers, Arrays, usw.. (aber nicht für floats)