Results 1 to 4 of 4

Thread: Reverse For Loop

  1. #1
    Join Date
    Apr 2012
    Posts
    157
    Mentioned
    10 Post(s)
    Quoted
    57 Post(s)

    Default Reverse For Loop

    Is there a way to have a For loop count down from say 100 to 0?

    Thanks!

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Simba Code:
    For I:= 100 downto 0 do

    For I:= High(Meh) downto 0 do

    //Etc..
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Use downto.
    Simba Code:
    for i := 100 downto 0 do
      Writeln(i);

    Edit: 'd.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  4. #4
    Join Date
    Apr 2012
    Posts
    157
    Mentioned
    10 Post(s)
    Quoted
    57 Post(s)

    Default

    Thank you muchly sir!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •