Mia
Mia

Reputation: 39

Smalltalk throwing nextLine Error

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.

Upvotes: -1

Views: 138

Answers (1)

Karsten
Karsten

Reputation: 2433

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

Upvotes: 2

Related Questions