From f174ec99275435b3707da1317c413095198d009f Mon Sep 17 00:00:00 2001 From: Gabriel <68819302+obsidianical@users.noreply.github.com> Date: Thu, 16 Dec 2021 10:40:06 +0100 Subject: [PATCH] Update animal.sm --- sm-test-files/animals-example/animal.sm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sm-test-files/animals-example/animal.sm b/sm-test-files/animals-example/animal.sm index 4e096d8..9bc5858 100644 --- a/sm-test-files/animals-example/animal.sm +++ b/sm-test-files/animals-example/animal.sm @@ -2,7 +2,7 @@ && '++name declares an abstract class && all of that is, of course, a statement so ¡! -¡'++animal +'++animal ( && +}}type{{ declares a property of a class && "+}}type{{ declares a static property of a class @@ -10,17 +10,17 @@ ¡+}}string{{ speed!; && ### declares the constructor - ¡### /}}string{{ name\ /speed\ | + ### /}}string{{ name\ /speed\ | ( ¡<=/"Created animal named " + name\!; && +var refers to a property, like this. in other languages && you can only assign values to static variables once in this language ¡+name < name!; ¡+speed < speed!; - ! + ) && +# declares a method - ¡+#walk /distance\ | + +#walk /distance\ | ( ¡<=/¿+name + " walked " + (+speed * +distance)?\!; - ! -! + ) +)