Search code examples
smalltalkvisualworks

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.


Solution

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