It sounds like you're talking about clearing the screen with spaces. Note that you don't have to: ordinary newlines work just fine. And then you only have to worry about the screen's height, not its width as well. :)
In my case it was filling the screen so as to create an image.