I once bought return tickets for Glasgow from Aberdeen, but I was going to Perth, but the price of tickets was cheaper to Glasgow (it was during some promotion). I had no problems getting off and on the train at Perth provided I used the same train I was supposed to be using to Glasgow - like Tom says.