As

From Lazarus wiki
Revision as of 10:30, 18 September 2012 by BigChimp (talk | contribs) (Removed Object pascal again... was really guessing)
Jump to navigationJump to search

As

The keyword as is used to cast (use one variable type as if it were another type)

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

here the Sender variable of type TObject is being cast as type TDBGrid

As is a Pascal language extension compared to? presumably original ISO Pascal?