Difference between revisions of "As/es"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "== As == La palabra reservada '''As''' pertenece a la programación orientada a objetos y se utiliza para convertir (TypeCast) un objeto en una clase. Para ello, el objeto de...")
 
(Have been restored template which is present in English version (language bar + categories). Also deleted category because it is already included in template (for all languages).)
Line 1: Line 1:
 +
{{as}}
 
== As ==
 
== As ==
  
Line 14: Line 15:
  
 
Aquí  la variable Sender del tipo (type of) TObject se convierte/asigna como ('''as''') tipo (type) TDBGrid.
 
Aquí  la variable Sender del tipo (type of) TObject se convierte/asigna como ('''as''') tipo (type) TDBGrid.
 
[[Category:Reserved words/es]]
 

Revision as of 21:03, 8 January 2018

Deutsch (de) English (en) español (es) suomi (fi) français (fr)

As

La palabra reservada As pertenece a la programación orientada a objetos y se utiliza para convertir (TypeCast) un objeto en una clase. Para ello, el objeto debe ser una instancia de la clase.

Ejemplo:

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

Aquí la variable Sender del tipo (type of) TObject se convierte/asigna como (as) tipo (type) TDBGrid.