Location: JBPLAY \ Meteor 2 \ General \ (do)while loop WORKS!!!! Back to Threads |
arezey
![]() Joined: 16 June 2005 Posts: 1599 |
26 May 2006 20:38 (UK time)
It works! I have been testing a little bit about do...while and here are the results. do...while is another loop. When use do...while and when while? while(){} is a loop when you have a loop that is checked first before the first occurence, do{}while() is done first and checked and then if true, a new occurence will be happened. I have zipped a few tests, try them out. Good luck and find a way to use the new loops EDIT: Warning, you need to do the increasement (++var) manually, (do)while loop will NOT add it automaticly Edited: 26 May 2006 20:40 You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
27 May 2006 23:07 (UK time)
Can you do anything useful with this? You need to login to create posts in this thread. |
arezey
![]() Joined: 16 June 2005 Posts: 1599 |
30 May 2006 12:35 (UK time)
Well you can count with it, the syntax is easier (an option for for), do...while gives you the ability to count 1, 40, 41, 42, 43, 44, 45, 46, 47, 48 or something like that. Also it is nice to have something new at the scripts ![]() -------------------------------------------------------------------------------- Plus there are some nice operators too: +=, x += 3 is the same as x = x + 5 -=, x -= 3 is the same as x = x - 5 *=, x *= 3 is the same as x = x * 5 /=, x /= 3 is the same as x = x / 5 And maybe %, 10 % 3 is 1 (modulus) You need to login to create posts in this thread. |
|
Forums system (C) 1999-2023 by James Bunting.
Terms of Use