Autor Beitrag
dominikkv2
Hält's aus hier
Beiträge: 8


Turbo Delphi
BeitragVerfasst: Sa 30.09.06 12:13 
hi
ich habe folgendes problem:

ich will das:
aP[2] = new Array(2855,0,'
in eine variable (string) speichern

leider geht das nicht mit
a := 'aP[2] = new Array(2855,0,'';
weil er mit dem ' am schluss ducheinander kommt

geht das irgendwie auf einem anderen weg?
danke schonmal für eure antworten :)
mfg.dominikkv
Reinhard Kern
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 591
Erhaltene Danke: 14



BeitragVerfasst: Sa 30.09.06 12:21 
user profile icondominikkv2 hat folgendes geschrieben:
hi
ich habe folgendes problem:

ich will das:
aP[2] = new Array(2855,0,'
in eine variable (string) speichern

leider geht das nicht mit
a := 'aP[2] = new Array(2855,0,'';
weil er mit dem ' am schluss ducheinander kommt

geht das irgendwie auf einem anderen weg?
danke schonmal für eure antworten :)
mfg.dominikkv


Hallo,

probiers mal mit d3 x ' am Schluss.

Gruss Reinhard
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 30.09.06 12:21 
du musst den ' in einem String immer doppelt machen => ''
also wenn du z.B. He's schreiben willst musst du Str:='He''s' schreiben

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Sa 30.09.06 18:03 
Hallo,

alternativ:
ausblenden Delphi-Quelltext
1:
2:
3:
s := 'He'+#39+'s';
//oder
s := 'He'+Chr(39)+'s';
dann bleibt es übersichtlich.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )