[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in "break" command
From: |
Paryshaan |
Subject: |
Bug in "break" command |
Date: |
Sun, 2 Jun 2013 23:13:02 -0700 (PDT) |
when a m file with a loop calls another which has "break" command, it doesn't
affect the loop of first file. I mean it should exit from the loop, but it
has no effect and only exits from the second file.
For example: if we have 2 m files "Temp1.m" and "Temp2.m" like these:
Temp1:
for k=1:3
Temp2
k
endfor
Temp2:
if k==2
break
endif
Now if we run "Temp1" the result will be:
k = 1
k = 2
k = 3
Now if we replace "break" with "continue" and run "Temp1" again we have:
k = 1
k = 3
Many tanks for your attention.
-----
Paryshaan
--
View this message in context:
http://octave.1599824.n4.nabble.com/Bug-in-break-command-tp4653656.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Bug in "break" command,
Paryshaan <=