Win a copy of Java XML & JSON this week in the XML and Related Technologies 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Using IntelliJ for Scala Workbooks  RSS feed

 
Greenhorn
Posts: 22
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: 3080
108
  • 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: 22
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!