Learn English – The difference between “as” “when” and “while”

differencetime

What's the difference between "as", "when" and "while"?

The doorbell rang as/when/while Anna was asleep.

Which is right and why?

Best Answer

While is used only about a continuous state, and another event or state that happens during that time. It does not imply or refute causality.

The doorbell rang while I was making dinner. - single
I listened to the radio while i was making dinner. Continuous

When implies a causal relationship between two things: when X happens Y happens. It can be used about a single event, an intermittent state or a continuous state

Please come and see me when you are free. - single
When the red light is showing, you can't cross the road. - intermittent (whenever)
When we were young, life was simpler. - continuous

When as is used about time, it implies two events or states happening by chance at the same time

I saw her as I was leaving. - event
The doorbell rang as she slept. - event/state
The sun was setting as the boat sailed away. - state/state

As @Peter pointed out, as can also mean because.

The phone rang as she was sleeping. (time)
She didn't answer the phone, as she was sleeping. (because)

The best word to use in your example is while. When is not suitable because there is no causality. As is possible and clear in this case, but may be ambiguous in similar situations.