<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Syntax</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>Recent changes to Syntax</description><atom:link href="https://sourceforge.net/p/mortal/wiki/Syntax/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 26 May 2022 03:13:18 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mortal/wiki/Syntax/feed" rel="self" type="application/rss+xml"/><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v18
+++ v19
@@ -6,7 +6,7 @@
 ------------
 Here's the classic Hello World program, as it might look in MORTAL:

-    import "stdio";
+    import "stdio"

     public main(): int
     {
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Thu, 26 May 2022 03:13:18 -0000</pubDate><guid>https://sourceforge.neted276b949fb0b8562cefd41a5ac43b5d0f30227f</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v17
+++ v18
@@ -10,8 +10,8 @@

     public main(): int
     {
-      stdout.printf("Hello World\n");
-      return 0;
+      stdout.printf("Hello World\n")
+      return 0
     }

 Unicode support
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Sun, 25 Aug 2019 19:58:57 -0000</pubDate><guid>https://sourceforge.netd27cb6435f30febe759b4f414d03caf1310c4a8a</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v16
+++ v17
@@ -22,7 +22,7 @@
 ------------
 Forward declarations are never necessary. The compiler is multipass and does not have a problem with you referring to a type, variable, or function which is defined later, even circularly.

-There are no header files, modules are imported directly. If you need to get an overview of a module's public interface, you should use other tools. For example, you could use something to generate documentation from the source code, or use an IDE that can generate an index of the source code.
+There are no header files, modules are imported directly. (If you need to get an overview of a module's public interface, you should use other tools. For example, you could use something to generate documentation from the source code, or use an IDE that can generate an index of the source code.)

 Topics
 ------
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Wed, 05 Mar 2014 12:48:46 -0000</pubDate><guid>https://sourceforge.netd9120e2191b4c7ac4a638519f1af7917fe756805</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Wed, 05 Mar 2014 12:47:37 -0000</pubDate><guid>https://sourceforge.nete92a60e93687b9c5b448b75df059eda4adb38dc6</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v14
+++ v15
@@ -4,7 +4,7 @@

 Hello, World
 ------------
-Here's the classic Hello World program, as it might look in M.O.R.T.A.L.:
+Here's the classic Hello World program, as it might look in MORTAL:

     import "stdio";

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Fri, 16 Aug 2013 16:23:33 -0000</pubDate><guid>https://sourceforge.net209afae753d4168b857d75b37dc6f9116bf1b3ed</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -29,6 +29,6 @@

 * [Syntax-Declarations]
 * [Syntax-Classes]
-* [Syntax-Methods]
+* [Syntax-Functions]
 * [Syntax-Statements]
 * [Syntax-Expressions]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Fri, 16 Aug 2013 16:22:46 -0000</pubDate><guid>https://sourceforge.netc62bdef480e2e6143eb1a005204172c253013353</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v12
+++ v13
@@ -1,4 +1,4 @@
-Syntax for the Imperative paradigm
+Syntax for the imperative paradigm
 ==================================
 The basic syntax uses elements from C++, C#, Java, and Pascal. The structure is similar to C++, but variable/field/parameter declarations are somewhat inspired by Pascal syntax, where it's very clear whether something is supposed to be a type or not. This allows the compiler to parse any module without needing to parse imported modules first. Since the language doesn't use header files, this can be a good thing.

@@ -24,28 +24,11 @@

 There are no header files, modules are imported directly. If you need to get an overview of a module's public interface, you should use other tools. For example, you could use something to generate documentation from the source code, or use an IDE that can generate an index of the source code.

-Structs and classes
--------------------
-The usual, run-of-the-mill polymorphic classes are available.
+Topics
+------

-    import "stdio";
-
-    class Printer
-    {
-      print(msg: cstring) { stdout.printf(msg); }
-      virtual hello() { }
-    }
-
-    class HelloPrinter: Printer
-    {
-      hello() { print("Hello World\n"); }
-    }
-
-    public main(): int
-    {
-      printer: Printer = HelloPrinter();
-      printer.hello();
-      return 0;
-    }
-
-For more information on classes, see [Syntax-Classes].
+* [Syntax-Declarations]
+* [Syntax-Classes]
+* [Syntax-Methods]
+* [Syntax-Statements]
+* [Syntax-Expressions]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Fri, 16 Aug 2013 16:21:28 -0000</pubDate><guid>https://sourceforge.net98ebe970c1d18695ec2fc307176abee33b95995c</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -41,7 +41,7 @@
       hello() { print("Hello World\n"); }
     }

-    main(): int
+    public main(): int
     {
       printer: Printer = HelloPrinter();
       printer.hello();
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Tue, 13 Aug 2013 13:02:16 -0000</pubDate><guid>https://sourceforge.net1b344b3399d345246709532eb9a023d12a5821fd</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -8,7 +8,7 @@

     import "stdio";

-    main(): int
+    public main(): int
     {
       stdout.printf("Hello World\n");
       return 0;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Tue, 13 Aug 2013 12:59:10 -0000</pubDate><guid>https://sourceforge.net5c14e4cdc5dff3cd76a1eafb18789cc6f0598788</guid></item><item><title>Syntax modified by Ove Kåven</title><link>https://sourceforge.net/p/mortal/wiki/Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -48,24 +48,4 @@
       return 0;
     }

-Notes:
-- Structs are *value types*, meaning instances of them are usually allocated on the stack, and passed by value (copied). Also, unlike classes, structs can not be polymorphic.
-- Classes are *reference types*, meaning instances of them are usually allocated on the heap, and passed by reference. If the class supports it, they are automatically reference counted when assigned and passed around, so the programmer doesn't have to worry about memory management.
-
-Generics
---------
-Structs and classes can be parametrized. In this case, they work much like Java generics, in that the class implementation itself is unaware of the actual type stored, and treats it as a generic pointer.
-
-    class Container&lt;:T&gt;
-    {
-      stg: T;
-      set(d: T) { stg = d; }
-      get(): T { return stg; }
-    }
-
-    main(): int
-    {
-      Container&lt;:cstring&gt; info;
-      info.set("Hello World\n");
-      stdout.printf(info.get());
-    }
+For more information on classes, see [Syntax-Classes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ove Kåven</dc:creator><pubDate>Tue, 06 Aug 2013 19:46:01 -0000</pubDate><guid>https://sourceforge.net23809a020124f77f88d2795c5e1fc23fb0e8b575</guid></item></channel></rss>