reads into and tests currentchar

while(readchar(&currentchar))