scala scala import scalop.ScalopApp object MyApp extends ScalopApp { val name = opt[String](required = true, descr = "Name of the user") val age = opt[Int](default = Some(30), descr = "Age of the user") def runApp(): Unit = { println(s"Hello, ${name()}! You are ${age()} years old.") } parse(args) runApp() }


上一篇:
下一篇:
切换中文