Hallo elcapitano,

du darfst ein Unterprogramm (Pr nicht in die Hauptschleife einfügen.
Unterprogramme gehören hinter das End.

Gruß Dirk