From 814a650a1c1a8c0315a9393b0e3f467907b9a0c1 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 28 Jun 2020 16:55:33 -0400 Subject: Update examp.tnsl --- examp.tnsl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examp.tnsl b/examp.tnsl index 03c7135..f06da43 100644 --- a/examp.tnsl +++ b/examp.tnsl @@ -9,13 +9,8 @@ # Preprocessor directives are like this :pack main - -# You can also create a block of them. -/: - import what.tnsl - import "what.tnsl" -:/ - +:import what.tnsl +:import "what.tnsl" @@ -60,7 +55,7 @@ ;~int j = ~i # address of int j = address of i j~ = 2 # i = 2 # data of j = 2 - # /loop represents the only loop in tnsl + # /;loop represents the only loop in tnsl # loop is followed by (init statements) [multi statements] # where the first statement in multi is the test, and the once statements are only run once at the beginning of the loop /; loop [i!==1] @@ -83,6 +78,8 @@ # When defining a new struct, use {} ;s1 a = {} +# Same as +;s1 a{} ;a.Name = "Kyle Gunger" ;~s1 b = ~a @@ -93,7 +90,7 @@ # These come in the same order that they do in the struct, so {Name, Message} in this case. # You can also specify -;s1 d = { +;s1 d{ Message = "Message", Name = "Name" } @@ -106,7 +103,10 @@ 1, 2, 3, 4 } - +# Same as +;{}int a{ + 1, 2, 3, 4 +} # You may also define an initializer like such: -- cgit v1.2.3