It seems a double loop requires print()

February 26 2010 by Christopher2222 3129
false

0


I may have stumbled upon a loop quirk

for m from 1 to 5 do
  m;
end do;

                                                1
                                                2
                                                3
                                                4
                                                5

for n from 1 to 5 do
  for m from 1 to 5 do
     m;
  end do;
end do;

I get a return of nothing, I have to use print(m).  Is this a quirk with double loops?

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account