Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse Pascal loop like in VB

Tags:

loops

pascal

I have a 'For' loop that displays pages in a Wizard.

The loop looks like this:

  for i := 0 to nodes.Length - 1 do 

  begin

  end;

How to reverse it to display last items first? In VB, I would add a Step -1 to the loop to start with the last item. How to accomplish the same behavior in Pascal?

like image 391
SharpAffair Avatar asked Sep 06 '25 03:09

SharpAffair


1 Answers

for i := nodes.Length - 1 downto 0 do 
  begin

  end;
like image 135
MRAB Avatar answered Sep 07 '25 21:09

MRAB