Yes. Pseudo-code:
while (button not pressed) { /* do nothing */; }
There are better ways to achieve what you want, though.