|
-
May 5th, 2005, 08:09 PM
#1
Thread Starter
Lively Member
label scope, goto statement question
hi, i have come from vb6 and then to vb.net and then to C#.
i understand why you should not be able to jump into for loops and such with loop counters, but what about if {} statements? For example, the following code:
Code:
if(something1) {
action1:
// do stuff
} else if(something2) {
action2:
if(flag) goto action1;
// do stuff ...
}
does not work. Is there some hack around this or what would break if the compliler allowed this to happen?
Many thanks in advance ,
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|