From 37f822eb66dc18a2b3bfdaa672081b6f08ef5688 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 13 Feb 2014 22:13:23 -0800 Subject: SI-7711 Do not emit extra argv in script body Take away `argv` and make `args` the standard parameter name. This is a quick fix to avoid "unused local" lint error. All the examples use `args`; in particular, "Step 4. Write some Scala scripts" in "Programming in Scala" uses `args`. I see the footnote there is also where Odersky concatenation is specified, `"Hello, "+ args(0) +"!"` with no space next to the literals. Also removes `argv` from `StdNames`. Was torn whether just to add `argc`. Maybe start a new project to house Names, emeritus. --- src/manual/scala/man1/scala.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/manual') diff --git a/src/manual/scala/man1/scala.scala b/src/manual/scala/man1/scala.scala index 6b3be8b77f..92d9c59cca 100644 --- a/src/manual/scala/man1/scala.scala +++ b/src/manual/scala/man1/scala.scala @@ -215,7 +215,7 @@ object scala extends Command { "exec scala \"$0\" \"$@\"\n" + "!#\n" + "Console.println(\"Hello, world!\")\n" + - "argv.toList foreach Console.println"), + "args.toList foreach Console.println"), "Here is a complete Scala script for MS Windows: ", @@ -226,7 +226,7 @@ object scala extends Command { "goto :eof\n" + "::!#\n" + "Console.println(\"Hello, world!\")\n" + - "argv.toList foreach Console.println"), + "args.toList foreach Console.println"), "If you want to use the compilation cache to speed up multiple executions " + "of the script, then add " & Mono("-savecompiled") & " to the scala " + @@ -237,7 +237,7 @@ object scala extends Command { "exec scala -savecompiled \"$0\" \"$@\"\n" + "!#\n" + "Console.println(\"Hello, world!\")\n" + - "argv.toList foreach Console.println")) + "args.toList foreach Console.println")) val exitStatus = Section("EXIT STATUS", -- cgit v1.2.3