# Can default from switch/case be used in another switch/case?

**URL:** <https://forum.kirupa.com/t/can-default-from-switch-case-be-used-in-another-switch-case/37499>\
**Category:** Uncategorized\
**Created:** [December 10, 2003, 11:01pm UTC](https://forum.kirupa.com/t/can-default-from-switch-case-be-used-in-another-switch-case/37499 "2003-12-10T23:01:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [December 10, 2003, 11:01pm UTC](https://forum.kirupa.com/t/can-default-from-switch-case-be-used-in-another-switch-case/37499/1 "2003-12-10T23:01:35Z")

</div>

I am doodling at work :jail: and wondering if this is possible. Unfortunately I don’t have flash in front of me so I can’t test it but since my AS is so horrible it probably wouldn’t help anyway!

I want this on an MC:  
[AS]  
i = 0;  
switch(thing){  
case 0:  
some action; break;  
case 1:  
some other action; break;  
default:  
i++;  
}

if (i \< 7) {  
switch (i) {  
case 1:  
something else; break;  
case 2:  
something something else; break;  
}}  
[/AS]

etc.

Basically what I’m wondering is, will I lose the value of i in the first switch once I’m out of the switch? Can the second switch read the 1st switch?
