1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

Low

unit
system
category
range handling

declaration
function Low(X)

description
Returns the smallest available value for a range.

Low containing the first element of an Ordinal, Array or string. The Low function is used with the High function to determine the size of an array, for example.

example
//example 1
type TExperience=(Beginner, Intermediate, Advanced);
var aProg : TExperience;

aProg := High(aProg); //aProg = Advanced
 
//example 2
var 
 dblArray: array[1973..2003] of Double;
 i : integer;

for i:= Low(dblArray) to High(dblArray) do
begin
// add code for i going from 1973 to 2003
end

//example 3
type TAPI=(API, MAPI, SAPI, IAPI);
var aapi:Tapi;
...
for i := Low(aapi) to High(aapi) do
 if i:=mapi then showmessage(inttostr(i));
end;

in real code

see also


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.