Perhaps this SDL tutorial "Getting String Input" might help?

http://www.lazyfoo.net/SDL_tutorials/lesson23/index.php

It isn't Pascal, but should be easy to get info from

cheers,
Paul