Again, another way to write the above example is to use the until control sequence:
#!/bin/sh until test $# -eq 0 do echo parameter $1 shift done exit 0