If such a program ever terminates, then the result is rational. If it doesn't terminate, then pausing at any point will always describe an infinite number of irrationals.
Sorry, I caught your comment only a few days later. What do you mean by "infinite number of irrationals"? We are talking about a deterministic machine here, so surely it describes only one number?