begin

  integerfn getchar
    integer sym
    readsymbol(sym)
    printstring("Call returned "); printsymbol(sym); newline
    result = sym
  end
  
  printstring("Please enter the word BUG when I ask for data:"); newline

  if 'A' <= getchar <= 'C' start
    printstring("Test successful."); newline
  else
    printstring("Test failed - getchar was called twice."); newline
  finish

endofprogram