1 2 3 4 5 6
integer function getpat (str, pat) integer str (100), pat (100) integer makpat getpat=(makpat (str, 1, -2, pat)) return end