diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-07-12 14:04:04 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-07-12 14:04:04 +0000 |
commit | 4080a760cb70b131a6e932cb93a75a7bea4c725e (patch) | |
tree | 552e584503257bdf59e12130296bb941fe1d12e1 /src/manual | |
parent | 856c86e29d172e08ebca403b1722555e6f2dbf6f (diff) | |
download | scala-4080a760cb70b131a6e932cb93a75a7bea4c725e.tar.gz scala-4080a760cb70b131a6e932cb93a75a7bea4c725e.tar.bz2 scala-4080a760cb70b131a6e932cb93a75a7bea4c725e.zip |
documented -savecompiled
Diffstat (limited to 'src/manual')
-rw-r--r-- | src/manual/scala/man1/scala.scala | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/manual/scala/man1/scala.scala b/src/manual/scala/man1/scala.scala index 15237babc8..1ba280e690 100644 --- a/src/manual/scala/man1/scala.scala +++ b/src/manual/scala/man1/scala.scala @@ -21,7 +21,8 @@ object scala extends Command { CmdLine( " [ " & Argument("compiler-option") & " | " & - Mono("-howtorun:") & Argument("how") & " ]... " & + Mono("-howtorun:") & Argument("how") & " | " & + Mono("-savecompiled") & " ]... " & "[ " & Argument("torun") & " " & Argument("argument") & "... ]")) @@ -41,6 +42,15 @@ object scala extends Command { "."), Definition( + Mono("-savecompiled"), + "Save this compiled version of scripts in order to speed up " & + "later executions of the same script. When running a script, " & + "save the compiled version of in a file with the same name as the " & + "script but with an extension of " & Mono(".jar") & ". On subsequent " & + "runs of the same script, the pre-compiled " & Mono(".jar") & " file " & + "will be used if it is newer than the script file."), + + Definition( Mono(Argument("torun")), "A top-level object or a script file to run."), @@ -169,7 +179,7 @@ object scala extends Command { "Console.println(\"Hello, world!\")\n" + "argv.toList foreach Console.println"), - "Here is a complete Scala script for Unix: ", + "Here is a complete Scala script for MS Windows: ", CodeSample( "::#!\n" + @@ -178,7 +188,18 @@ object scala extends Command { "goto :eof\n" + "::!#\n" + "Console.println(\"Hello, world!\")\n" + - "argv.toList foreach Console.println")) + "argv.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 " + + "command:", + + CodeSample( + "#!/bin/sh\n" + + "exec scala -savecompiled \"$0\" \"$@\"\n" + + "!#\n" + + "Console.println(\"Hello, world!\")\n" + + "argv.toList foreach Console.println")) val exitStatus = Section("EXIT STATUS", |