Smalltalk throwing nextLine Error

135 views Asked by At

For Smalltalk do we need to import some library to use nextLine?

Transcript show: 'Whatz your name?'. 
userName := stdin nextLine.

When I try to evaluate it throws an error.

1

There are 1 answers

1
Karsten On BEST ANSWER

Method #nextLine is implemented in Stream. Stdin should be a stream. But "stdin" (with lowercase) is probably a typo.