• 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
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Using IntelliJ for Scala Workbooks  RSS feed

 
Greenhorn
Posts: 24
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: 3189
119
  • 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: 24
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.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!