Sign in Join
Wiki copytemporary

As/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: As/de

OldNewLine
1+\
2+Zurück zu den [[Reserved words/de|reservierten Wörtern]].\
3+\
4+Das reservierte Wort <b>as</b> gehört zur objektorientierten Programmierung.\
5+Das reservierte Wort <b>as</b> wird für die Typumwandlung (Typecast) eines Objektes in eine Klasse verwendet.\
6+Dafür muss das Objekt eine Instanz der Klasse sein.\
7+Beispiel:\
8+
9+``` pascal
10+var
11+ objForm : TForm;
12+
13+begin
14+ ...
15+ // Typumwandlung auf dem Standardweg
16+ objForm := TForm1(Sender: TObject);
17+
18+ // Typumwandlung von 'Sender' unter Verwendung des Schlüsselwortes As
19+ objForm := Sender As TForm1;
20+ ...
21+```
22+
23+\
24+\
25+--Olaf 18:04, 30 October 2012 (UTC)
26+
27+---
28+*From the Free Pascal wiki, page "As/de", as it stood on 2020-01-31 after a change by GAN, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
29+Category: Reserved words/de

Back to history