in reply to subroutine and good practices

But both subroutines take the same arguments ..

Have you considered using objects ?

poj