Learn English – difference between UNTIL and BEFORE

sentence-construction

I searched the internet for it and I found this.

Event-1 UNTIL Event-2
Event-1 continues up to the time when Event-2 begins.
Event-1 BEFORE Event-2
Event-1 occurs prior to the time when Event-2 begins.

So, to make sure that I understand this fully, I made 2 right sentences and 2 wrong sentences. And I'd like to know if I've done a good job.

2 right sentences

Until you called me, I had been studying for about 3 hours.

Before you called me, I'd visited a store and bought some foods.

2 wrong sentences.

Until you called me, I'd visited a store and bought some foods.

Before you called me, I had been studying for about 3 hours.

Best Answer

Out of your 4 sentences, three are correct. The only one that is not correct is:

Until you called me, I'd visited a store and bought some foods.

Until is used for to specify a duration going on up to the point specified by what follows until.

In the following sentence, the action of studying for about 3 hours had been going on up to the point where the speakers was called.

Until you called me, I had been studying for about 3 hours.

The same sentence, but with before, is also correct, but there is a difference in meaning. The studying here also took about 3 hours, but it had already stopped at the moment that the speaker was called. So, the caller did not interrupt or stop the person studying:

Before you called me, I had been studying for about 3 hours.

The third correct sentence is:

Before you called me, I'd visited a store and bought some foods.

The action was completed before the speaker was called. This is the reason that until cannot be used here, because that would mean the action had been going on up to the point where the person was called. The past perfect had visited here implies that the speaker had already finished the action of going to the store to buy food.