Compare two string in a while loop

Ok but how can I reinitialyze the value of motInter global variable inside the void loop without declare a local variable ?