As/fr: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## As | |
| 2 | 2 | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - | ||
| 3 | + | Le [[Keyword/fr|mot clé]] **as** est utilisé pour convertir (utiliser une variable d'un type comme si elle était d'un autre type). | |
| 4 | + | ``` | |
| 6 | 5 | procedure TmainForm.selectionGridDrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); | |
| 7 | - | ||
| 8 | - | ||
| 9 | - | ||
| 6 | + | begin | |
| 7 | + | (Sender As TDBGrid).DefaultDrawColumnCell(Rect,DataCol,Column,State); | |
| 8 | + | end; | |
| 10 | 9 | ``` | |
| 11 | 10 | ||
| 12 | - | ||
| 11 | + | ici la variable Sender de type TObject est convertie en TDBGrid. | |
| 13 | 12 | ||
| 14 | 13 | L'opérateur As est une extension de Pascal Objet et Delphi. | |
| 15 | 14 | ||
| 16 | 15 | --- | |
| 17 | - | ||
| 18 | - | ||
| 16 | + | *From the Free Pascal wiki, page "As/fr", as the Internet Archive kept it on 2023-03-30. 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).* |
