A quick question.....

Game Editor comments and discussion.

A quick question.....

Postby speckford123 » Tue Oct 31, 2006 2:09 pm

How does "break" work?
I would like to use it.
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Postby sonicfire » Thu Nov 02, 2006 3:38 pm

Example (how "break" is/will be used):

Code: Select all
switch (myvar)
{
    case 0: // if myvar is 0
    // do something
    break;

    case 1: // if myvar is 1
    // do this
    break;

    case 2: // and so on
    // yup
    break;
}
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Postby DilloDude » Fri Nov 03, 2006 10:25 am

Also use it in a for or while loop to break out.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest