restart(on=T)
This is a function to be used only by the adept and strong at heart. Use of restart can be dangerous to your health and social standing. In particular, if the function calling restart has an error, an infinite loop of errors can easily result; hence the use of quit as a loop-hole.
amp;# prompt for expressions & evaluate them pause <- function() { restart(T) cat("Enter expressions, q to quit from pause\n") repeat { e <- parse(prompt = "<P> ") if(is.name(e[[1]]) && e[[1]]=="q") return() print(eval(e, local = sys.parent(1))) } } amp;# look at browser for another example