Sign in Join
Wiki copytemporary

Revision 3 of 3, by WikiArchive on 11-4-2026. The page as it is now.

As/fr

As

Le mot clé as est utilisé pour convertir (utiliser une variable d'un type comme si elle était d'un autre type).

pascal
procedure TmainForm.selectionGridDrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
     (Sender As TDBGrid).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;

ici la variable Sender de type TObject est convertie en TDBGrid.

L'opérateur As est une extension de Pascal Objet et Delphi.


From the Free Pascal wiki, page "As/fr", 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.