Register | Login
Forum Index > Requests and Feedback > break statement
Author Message
Pages: 1 2
efgee
Member
(send private message)

Posts: 1
Topics: 0

Location:
[235] - posted: 2011-10-31 00:15:19
IMHO aliases are better than numbers...

Code:
  repeat this_one// outer loop
   {

     case that_one (..)
      {
        state .....:
              break;  // break the case block

        state .....:
               break this_one;  // break the repeat block 
      }
   };


When code size increases you will appreciate meaningful aliases over silent numbers.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[236] - posted: 2011-10-31 01:36:12
sorry i don't quite understand what you mean...can you explain?

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[237] - posted: 2011-10-31 01:39:35
aha nm i think i see now (tired going to bed lol)

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[244] - posted: 2011-10-31 20:35:02

efgee:

you can implement it even if break will support only number , consider the next code.
Code:
 const  this_one = 1;
  
  repeat // outer loop
   {

     case(..)
      {
        state .....:
              break;  // break the case block

        state .....:
               break 1;  // break the repeat block and so on break 2 ....etc
      }
   };
  



http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[245] - posted: 2011-10-31 20:38:17
sorry this is the correct code
Code:
const  this_one = 1;
  
  repeat // outer loop
   {

     case(..)
      {
        state .....:
              break;  // break the case block

        state .....:
               break this_one;  // break the repeat block and so on break 2 ....etc
      }
   };
  


http://www.freewebs.com/ogremagic/index.htm
Pages: 1 2
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 10 user(s) online. 0 member(s) and 10 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd