Register | Login
Forum Index > Requests and Feedback > break statement
Author Message
Pages: 1 2
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[221] break statement - posted: 2011-10-30 20:38:00

Hi

can Break take a parameter that allow breaking in nested blocks.

for example
Code:
  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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[225] - posted: 2011-10-30 20:44:09
Yes, this is something i have been looking into, and infact break having a numbered parameter is a good idea, i will add this.

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
[226] - posted: 2011-10-30 20:52:20
update: added smile

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
[227] - posted: 2011-10-30 20:56:11

good job. where is the updating?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[230] - posted: 2011-10-30 20:58:42
for next release of course, for now you can do

Code:
  repeat // outer loop
   {

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

        state .....:
               goto @exitloop;
      }

@exitloop:
   };
  


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
[231] - posted: 2011-10-30 21:00:23

ok thanks, nice work around.

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[232] - posted: 2011-10-30 21:04:33
sorry mistake

Code:
  repeat // outer loop
   {

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

        state .....:
               goto @exitloop;
      }
   };
@exitloop:
  


*corrected smile

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
[233] - posted: 2011-10-30 21:05:50

ok , i got the idea from first post. thank you.

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


Quick reply:

Message:



Currently Active Users:
There are currently 1 user(s) online. 0 member(s) and 1 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