DelphiBasics
Of
Keyword
Linking keyword used in many places
  1 Case variable Of ...
  2 type name = Set   Of range;
  3 type name = Class Of class type;
  4 var  name : Array Of type;
  5 var  name : File  Of type;
Description
The Of keyword is used as a link in a number of Delphi declarations.
Related commands
Array A data type holding indexable collections of data
Case A mechanism for acting upon different values of an Ordinal
Class Starts the declaration of a type of object class
File Defines a typed or untyped file
Set Defines a set of up to 255 distinct values
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.




 
Example code : A simple example
// Full Unit code.
// -----------------------------------------------------------
// You must store this code in a unit called Unit1 with a form
// called Form1 that has an OnCreate event called FormCreate.
 
unit Unit1;
 
interface
 
uses
  Forms, Dialogs;
 
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;
 
var
  
Form1: TForm1;
 
implementation
{$R *.dfm} // Include form definitions
 
procedure TForm1.FormCreate(Sender: TObject);

var
  letters : set Of 'a'..'z';

begin
  // Set all of the set values on
  letters := ['a'..'z'];

  // See if a letter is lower case
  if 'g' in letters
  then ShowMessage('g is a lower case letter')
  else ShowMessage('g is not a lower case letter');
end;
 
end.
Hide full unit code
   g is a lower case letter
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Home Page