Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

for loop question 2

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
0
0
US
Anyway i could do a for loop with a 0.1 increment or am i just limited to integer?
Thanks.
P
 
You're limited to integers and to single iterations of 1 with for loops.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
If you want to use a for loop, but need the values to iterate through .1, .2, .3, .n

Then simply divide I by 10...

var
X: Double;
begin
For I := 1 to 100 do
begin
X := I/10;
...
end;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top