Autor Beitrag
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 15:00 
Hallo!
Wie können Apostrophs in Strings angezeigt werden? Also wie kann ich in einem Label den Text it's okay anzeigen?? Ich habs mal mit \' ausprobiert, wie ich das von PHP kenn... Hat aber nicht geklappt :(
AutopilotON
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win 98,ME,XP SP2,Suse 10.0
D6, TurboDelphi 2006
BeitragVerfasst: Mo 27.02.06 15:05 
Hi
ich kenn mich da nicht ganz so doll aus,
aber ich glaube, das funktioniert per askii.
der code für ein ' lautet #39.
habs einfach mal bei einer caption probiert, da delphi dort alles gleich umwandelt.
wies dann per im quellcode aussieht kannste dan in der .dfm datei nachschauen.
AutopilotON
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win 98,ME,XP SP2,Suse 10.0
D6, TurboDelphi 2006
BeitragVerfasst: Mo 27.02.06 15:11 
gut jetzt weiß ich genaueres.
Es ist ACSII.
eingeben wird das so:bsp. edit1.text
ausblenden Delphi-Quelltext
1:
edit1.text:='Dies ist ein Apostroph: ' + #39;					


# - erkennung für deplhi, dass es sich um ascii handelt
39 - ascii code für " ' "

du kannst es auch so schreiben, wie ascii bei der tastatureingabe üblich ist:
ausblenden Delphi-Quelltext
1:
edit1.text:='Dies ist ein Apostroph: ' + #0039;					
worm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 135


D6 Prof
BeitragVerfasst: Mo 27.02.06 15:16 
Wesentlich einfacher ist aber ein Doppel-Apostroph, wie Answer := 'It''s 42.';

_________________
In the beginning, the universe was created. This has made a lot of people very angry, and is generally considered to have been a bad move.
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 15:20 
Okay, danke für die schnelle Antwort! Auf die Idee bin ich natürlich nicht gekommen :lol:
Das ganze ist natürlich bissle umständliche, aber kammer wohl nix machen!
__________
Ooh, da hat ja gleich noch jm geantwortet!! Doppel-Apostroph... Ja, das ist viel praktischer. So machen die in PHP ein Backslash auch...

Danke an euch beide! Keine Fragen mehr offen 8)
LLCoolDave
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 212

Win XP
Delphi 2005
BeitragVerfasst: Mo 27.02.06 15:22 
Achja, nur so nebenbei, aber meines Wissens hat sich im Deutschen die Pluralbildung durch Anhängen eines s im Gegensatz zum Englischen noch nicht als Standard durchgesetzt, zumal Apostrophs beinahe unaussprechlich ist. ;)
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mo 27.02.06 15:25 
Außerdem erfolgt die Pluralbildung - im Englischen - ohne Apostroph!

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 17:26 
user profile iconGrishnak hat folgendes geschrieben:
Außerdem erfolgt die Pluralbildung - im Englischen - ohne Apostroph!
Hat das jm in Frage gestellt??
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 27.02.06 17:33 
Ihrs werdet's off topics ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mo 27.02.06 17:42 
@jonathanschmid: Das Posting von LLCoolDave schien mir in diese Richtung zu gehen...

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 19:35 
Oh... stimmt! Das geht in die Richtung :) Er meinte glaub ich das anhängen von s um den Besitz anzuzeigen
LLCoolDave
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 212

Win XP
Delphi 2005
BeitragVerfasst: Mo 27.02.06 19:45 
Mir ging es eigentlich darum, dass jemand hier der Meinung war, der Plural von Apostroph sei Apostrophs. Wir haben schon genug Neoanglizzismen im Alltag, da können wir wenigstens den guten, alten, deutschen Plural behalten.
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 19:47 
Also ich weiß ja nicht ganz genau was Neoanglizzismen heißt, aber was ist deiner Meinung nach denn der Plural von Apostroph??
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 27.02.06 19:55 
Hallo? :wave: Ignoriert Ihr mich absichtlich?

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 27.02.06 20:01 
[OT]
Folgendes sagt Langenscheidt:
Zitat:
Apo'stroph, der; -s,-e Auslassungszeichen, Zeichen: '

[/OT]

Aber das Thema an sich war ja eh gegessen... entweder mit ASCII oder zwei Apostrophs oder Apostrophe ;) nacheinander...


Zuletzt bearbeitet von Miri am Mo 27.02.06 20:02, insgesamt 1-mal bearbeitet
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 27.02.06 20:01 
Gemein, gemein

ausblenden Delphi-Quelltext
1:
Label1.Caption:='it'+''''+'s'+' okay ';					
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.02.06 22:32 
user profile iconChristian S. hat folgendes geschrieben:
Hallo? :wave: Ignoriert Ihr mich absichtlich?
So was würden wir nie tun ;)
Also Apostrophe heißt das... Werd ich mir merken!
user profile iconBlackheart666 hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
Label1.Caption:='it'+''''+'s'+' okay ';					
Das ist lustig!! :lol:
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: Mo 27.02.06 23:56 
Hallo,
user profile iconMiri hat folgendes geschrieben:
Aber das Thema an sich war ja eh gegessen... entweder mit ASCII oder zwei Apostrophs oder Apostrophe ;) nacheinander...
noch nicht ganz gegessen, die Variante fehlt noch:
ausblenden Delphi-Quelltext
1:
2:
3:
const Apo = #39;
//...
Label1.Caption:='it'+Apo+'s okay ';

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