Okay, so I've been trying to learn Scala from a textbook, but it was written before Scala 3 was released so a lot of the example code doesn't compile.
Here's how the book introduces command line arguments:
println(args(0).toDouble+args(1).toDouble)
and my best attempt at converting this to something Scala 3 compatible:
@main def main(args: Array[String]) = {
println(args(0).toDouble+args(1).toDouble)
}
and here's what the compiler tells me:
[error] ./add.scala:1:1
[error] No given instance of type scala.util.CommandLineParser.FromString[Array[String]] was found for parameter fs of method parseArgument in object CommandLineParser
[error] @main def main(args: Array[String]) = {
[error] ^
How do I fix this? There's another question like this one already posted, but the answers seem to all be written in prior versions of Scala. As for the official release guide, it recommends using something to do with CLP, which I don't understand.