Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Using IntelliJ for Scala Workbooks  RSS feed

 
Greenhorn
Posts: 21
Redhat Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

 I'm trying to find my blunder here. I just started the Coursera specialization in Scala, and the first class is Scala Principles. I've created a workbook and have code that was provided giving me an issue. I saw it compile in the video, lol so it's correct in some shape / form. I just can't quite understand the issue the compiler as with it.
Advice?



The error is
Error(8,8) not found: value guess
Error(8,16)  not found: value guess

Error(8,24)  not found: value x
Error(11,5)  not found: value guess
 
Master Rancher
Posts: 3001
105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

the variable guess is a parameter in the sqrtIter function, but not in the other functions. That is why you get the errors. So, make it a parameter too, there.

I too followed that course, you'll be in for a very interesting time, though not always easy. Enjoy!
 
Peter Azurahc
Greenhorn
Posts: 21
Redhat Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help Piet. I got it working.

Yes this is a very interesting course so far. I will say I am impressed with the language so far, very enjoyable to learn.
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!