A. When I went out, it was raining.
This sentence has two parts:
part A + part B
When I went out + it was raining.
You can begin with part A or part B:
• When I went out, it was raining.
• It was raining when I went out.
We write a comma (,) if part A (When ...) is before part B:
• When you're tired, don't drive.
• Don't drive when you're tired.
• Ann was very happy when she passed her exam.
• When Ann passed her exam, she was very happy.
We do the same in sentences with before/while/after:
• Always look both ways before you cross the road.
• Before you cross the road, always look both ways.
• While I was waiting for the bus, it began to rain.
• It began to rain while I was waiting for the bus.
• He never played football again after he broke his leg.
• After he broke his leg, he never played football again.
B. When I am ... / When I go ... etc.
When I am in New York
We use the present (I am / I go etc.) with a future meaning after when:
• When I get home this evening, I'm going to have a shower. (not 'When I will get home')
• I can't talk to you now. I'll talk to you later when I have more time.
We do the same after before/while/after/until:
• Please close the window before you go out. (not 'before you will go')
• Julia is going to live in our flat while we are away. (not 'while we will be')
• I'll stay here until you come back. (not 'until you will come back')
when / before / while / after
When I went out, it was raining.
It was raining when I went out.
Don't drive when you're tired.
Before you cross the road, always look both ways.
It began to rain while I was waiting for the bus.
After he broke his leg, he never played football again.
Present with future meaning
When I get home this evening, I'm going to have a shower.
I'll talk to you later when I have more time.
Please close the window before you go out.
I'll stay here until you come back.