for {
fmt.Fprintf(out, PROMPT)
scanned := scanner.Scan()
if !scanned{
return
HOW? How does it stop to work?
for {
fmt.Fprintf(out, PROMPT)
scanned := scanner.Scan()
if !scanned{
return
HOW? How does it stop to work?
Can you clarify what you mean by “stop to work?”
Do you mean that the code above stopped working? If so, then we’ll need a more complete example to see what it could be.
Or do you mean what causes the loop to stop? If so, it’s the return
statement which means to stop executing the current function and return to the caller.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.