added function "isendofproc" to test for END op