making switch read throughout LONG if/else sequence

hey all,
I'm making two specific light blink sequences and switching between them via a switch. However I'm only using one output, not both. When I change the state of the switch my code will finish the full if/else sequence before changing to the other, I want it to change instantly instead. I'm trying to figure out what command I can use to make the code reference the switch between each flash and delay and cannot find one that works, can anybody lend some advice?


I want it to change instantly instead.

Get rid of the delay()s, then.

State command and blink without delay are terms to search for.

you misunderstand, I want the sequence to run with the specified lengths of HIGH and LOW. However, I want to switch to the alternative sequence as soon as I change the state of the switch. Currently it has to finish the entire first sequence before it will switch the the alternative one.

No, I don't think Paul misunderstands.
Take a look at the blink without delay example, without delay.

(Seeing some code would help clear up misunderstandings)