Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Still a big mess

  • Loading branch information...
commit ecc51af61d1147abc21a0a355ce1b4018e6689d8 1 parent 21c9c20
@nddrylliog authored
Showing with 35 additions and 1 deletion.
  1. +13 −1 samples/console-vs-cowsay.dd
  2. +22 −0 samples/symbols.dd
View
14 samples/console-vs-cowsay.dd
@@ -4,7 +4,7 @@
.z (x + y)
.console :
- .writeln [.text] does:
+ .writeln op [.text] does:
C call 'printf' with ['%s' c_str, text c_str]
console writeln 'Sup dawg'
@@ -19,3 +19,15 @@ console writeln 'Sup dawg'
object .Greeter with:
+
+# ------ More symbols ------
+
+.x 42
+.x 42 + 3
+.x (42 + 3)
+
+.println op [.text] does:
+ something
+
+.println (op [.text] does: something)
+
View
22 samples/symbols.dd
@@ -1,4 +1,26 @@
+# Define a variable
+.x 42
+.name 'Amos'
+.chars ['A', 'm', 'o', 's']
+# Define a scope
+
+.me :
+ .name 'Amos Wenger'
+ .age 21
+
+# Scopes inside of scopes
+
+.appartment :
+ .info :
+ .size 45 m_2
+ .note "No noise please"
+ .rooms [
+ Room named 'kitchen' of_size 23 m_2
+ Room named 'bathroom' of_size 10 m_2
+ ]
+ .is_good do (: i++; console writeln 'Hi') until:
+ i < 3
Please sign in to comment.
Something went wrong with that request. Please try again.