|
| 21 Oct 2011 08:12 PM |
| while true do end = repeat until false |
|
|
| Report Abuse |
|
|
|
| 21 Oct 2011 08:12 PM |
| I don't understand your question... |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 21 Oct 2011 08:13 PM |
No.
The difference is that a repeat loop will go through once before checking if the condition is met. A while loop will check the condition first.
Also, 'repeat until false' will run once and stop. As 'while true do end' will constantly run with no end. |
|
|
| Report Abuse |
|
|
|
| 21 Oct 2011 08:15 PM |
| By that I was asking does repeat until false do an infinite loop like while true do end |
|
|
| Report Abuse |
|
|
| |
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 21 Oct 2011 08:22 PM |
while true do --stuff end
is **NOT** the same as
repeat --stuff until false
However, the while true do loop is the same as
repeat --stuff until true
|
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 21 Oct 2011 08:23 PM |
Wait... I failed... they are the same.
*facedesk* |
|
|
| Report Abuse |
|
|
hillow25
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 125 |
|
| |
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
| |
|