-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Looping backwards

Post by thrig that lists some ways to loop backwards

> ...loops that start at one minus the input number and decrement a counter down to 0.


If you have C-style for loops, here's a nice variant: "i starts from n and goes to zero."


for ( int i = n; i --> 0;  )

#programming


gemlog

-- Response ended

-- Page fetched on Sat May 4 05:28:40 2024