Question: Loop over empty table

Here's another basic question in programming, sorry about that.

This little program does a loop over a table which was just created, and thus empty. As far as I can see the for - do loop goes through the loop at least once.

Is there a way to change the program, so that it doesn't go through the contents of the loop at all?


 

i := table()

table( [ ] )

(1)

NULL

a := 0;

0

1

1

numelems(i)

0

(2)

NULL


 

Download table_and_loop.mw

Please Wait...