summaryrefslogtreecommitdiff
path: root/doc/faq/faq.xml
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2003-10-29 10:32:13 +0000
committerburaq <buraq@epfl.ch>2003-10-29 10:32:13 +0000
commita42f5acee13a8cd998b4074ceef201630f1ce6ae (patch)
treec05d0414e8605c0662c20b0622cdc23a10731a43 /doc/faq/faq.xml
parent63035c10a83415198030b67ee82e3b2ae99a0783 (diff)
downloadscala-a42f5acee13a8cd998b4074ceef201630f1ce6ae.tar.gz
scala-a42f5acee13a8cd998b4074ceef201630f1ce6ae.tar.bz2
scala-a42f5acee13a8cd998b4074ceef201630f1ce6ae.zip
still initial. added a title to the result f.a.q.
Diffstat (limited to 'doc/faq/faq.xml')
-rw-r--r--doc/faq/faq.xml45
1 files changed, 42 insertions, 3 deletions
diff --git a/doc/faq/faq.xml b/doc/faq/faq.xml
index 65f5f6bfeb..fd9bf1e1de 100644
--- a/doc/faq/faq.xml
+++ b/doc/faq/faq.xml
@@ -3,19 +3,58 @@
<!DOCTYPE faq PUBLIC "-//lamp.epfl.ch//DTD Scala FAQ//EN"
"scala-faq.dtd">
+<!-- This file is a collection of frequently asked questions on Scala -->
+
+<!-- You can link to entries in this document by using id attributes. -->
+<!-- Within the document, use the 'seealso' tag for this -->
+
+<!-- You can validate this file using C-c C-v. in [X]Emacs -->
+
<faq>
+ <!-- zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -->
+ <!-- General -->
+ <!-- zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -->
+
<section title="General">
<entry id="why">
- <question>Why another programming language </question>
- <answer>Read the rational on the <a
+ <question>Why another programming language ?</question>
+ <answer>Read the rationale available on the <a
href="http://scala.epfl.ch">Scala homepage</a></answer>
</entry>
+ <entry>
+ <question>How can I get an executable program ?</question>
+ <answer><p><em>First option</em>: use the Application mixin. Example:<code>
+class Foo with Application {
+ ... // the code
+}
+</code></p>
+
+ <p><em>Second option</em>: use an object that has a main method. E.g.
+<code><![CDATA[
+object Foo {
+ def main(args:Array[String]):Unit = {
+ ... //the code
+ }
+}]]></code>
+Of course you can leave away the specification of the result type. In
+that case you should take care that your main function does not return
+something else. The latter would result in the virtual machine not finding
+your function
+</p>
+</answer>
+
+ </entry>
+
</section>
+ <!-- zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -->
+ <!-- Less General -->
+ <!-- zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -->
+
<section title="Less General">
<entry>
- <question>Why is feature XYZ not integrated</question>
+ <question>Why is feature XYZ not integrated ?</question>
<answer>Convince us that it is useful. Make sure you read
<seealso ref="why"/> before </answer>
</entry>