There are chances that some typing (in Ubuntu terminal - scala -version Scala code runner version 2.9.1) errors occur, example shown below where instead of (l: Int) (l: int) has been typed in parameters.
scala> class Rectangle (l:int, w: Int){
| val length = l
| val length = w
.
.
.
few more lines but still ... module Rectangle is not defined. Or sometimes enter command given and error shows up.
Is there anyway where directly that typing error can be edited / modified and rerun the code? It will save great deal of time otherwise I am entering line by line using up/down arrow.
Please guide.
I don't know if there is a better solution, but in my case I tend to use my usual text editor to write code snippet and paste them using the paste mode of the REPL (you can enter the paste mode thanks to the :paste
command).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With