Autor Beitrag
PeterKiers
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26


D7
BeitragVerfasst: Mo 30.01.06 09:20 
hey leute,

ausblenden Quelltext
1:
if not (c in ['0'..'9']) then c:=#0;					


Was bedeutet c:=#0?

Peter Kiers


Zuletzt bearbeitet von PeterKiers am Mo 30.01.06 09:30, insgesamt 1-mal bearbeitet
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 30.01.06 09:30 
Moin!

Das ist das Zeichen mit dem Bytewert (oder ASCII-Code, oder Ordinalwert, oder was auch immer) NULL, also sowas wie NIL, nur für Char. :wink:

cu
Narses
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mo 30.01.06 09:32 
Nun, "c" ist hier wohl vom Typ "Char". Die Zeile prüft, ob "c" eine Ziffer darstellt und, wenn dem nicht so ist, wird es durch das ASCII-Zeichen mit dem Wert 0 (= "#0" oder "Chr(0)") ersetzt.

Ich tippe mal darauf, dass diese Zeile in der "OnKeyPress"-Methode eines TEdit-Objektes steht!

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!
PeterKiers Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26


D7
BeitragVerfasst: Mo 30.01.06 09:40 
Danke.

Peter
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 30.01.06 09:45 
Moin!

Wenn die Frage beantwortet ist, kennzeichnest du den Thread dann bitte entsprechend? Danke. :wink:

cu
Narses