Question: Simple question about excluding values from for loops

Say I wanted to print out all values from 1 to 8 but excluding 3, how would I do that using a for loop?

For example, this just stops after 2:

for i to 8 while i <> 3 do
end do ;

whereas I want it to skip 3 so going 1,2,4,5,6,7,8.

For what I'm actually doing, I need i to run over a range but excluding one value.




Please Wait...