summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/boolean.pcdt14
-rw-r--r--doc/internal_functions_dictionary6
-rw-r--r--doc/pcdt_examples/boolean.pcdt18
-rw-r--r--doc/pcdt_examples/example.pcdt (renamed from doc/example.pcdt)0
-rw-r--r--doc/pcdt_examples/helloworld.pcdt3
-rw-r--r--doc/pcdt_examples/includetest.pcdt2
6 files changed, 29 insertions, 14 deletions
diff --git a/doc/boolean.pcdt b/doc/boolean.pcdt
deleted file mode 100644
index 81b1f62..0000000
--- a/doc/boolean.pcdt
+++ /dev/null
@@ -1,14 +0,0 @@
-store(1; xv;)
-store(1; yv;)
-
-store(
-eq(xv() yv())
-res;)
-
-if(res()
-print(values equal;)
-)
-
-if(not(res())
-print(values not;)
-)
diff --git a/doc/internal_functions_dictionary b/doc/internal_functions_dictionary
new file mode 100644
index 0000000..b7fe7d6
--- /dev/null
+++ b/doc/internal_functions_dictionary
@@ -0,0 +1,6 @@
+root() -- executes all arguments. returns the eval of the last symbol
+store() -- stores a pointer to the first argument under the name specified by the eval of the second argument
+eq() -- returns 1 if the eval of all the arguments is the same, 0 if different. accepts any number of arguments
+if() -- if the eval of the first argument is 1, executes all the other arguments
+not() -- if the eval of the first argument is 1, returns 0, and vice versa
+print() -- prints the eval of the first argument to the console, and a newline character
diff --git a/doc/pcdt_examples/boolean.pcdt b/doc/pcdt_examples/boolean.pcdt
new file mode 100644
index 0000000..e6becd6
--- /dev/null
+++ b/doc/pcdt_examples/boolean.pcdt
@@ -0,0 +1,18 @@
+store(14; var1;)
+store(12; var2;)
+
+store(
+eq(var1() var2())
+res;)
+
+print(var1())
+
+if(res()
+print(equals;)
+)
+
+if(not(res())
+print(does not equal;)
+)
+
+print(var2())
diff --git a/doc/example.pcdt b/doc/pcdt_examples/example.pcdt
index 68d0a84..68d0a84 100644
--- a/doc/example.pcdt
+++ b/doc/pcdt_examples/example.pcdt
diff --git a/doc/pcdt_examples/helloworld.pcdt b/doc/pcdt_examples/helloworld.pcdt
new file mode 100644
index 0000000..6ad1398
--- /dev/null
+++ b/doc/pcdt_examples/helloworld.pcdt
@@ -0,0 +1,3 @@
+store(print(hello world;) HelloWorldFunc;)
+HelloWorldFunc()
+HelloWorldFunc()
diff --git a/doc/pcdt_examples/includetest.pcdt b/doc/pcdt_examples/includetest.pcdt
new file mode 100644
index 0000000..81aa285
--- /dev/null
+++ b/doc/pcdt_examples/includetest.pcdt
@@ -0,0 +1,2 @@
+@helloworld.pcdt
+HelloWorldFunc()