summaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-12-04 05:24:43 +0000
committerAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-12-04 05:24:43 +0000
commit43909b350b9084ed33f121a15c5770224cbdc79f (patch)
treeaff7f471784fbb1d1a3597acfeb43624d4ed94ad /src/examples
parentcc1f6e712520793d5a8c638a6e995c018917eadb (diff)
downloadesotericFORTRAN-43909b350b9084ed33f121a15c5770224cbdc79f.tar.gz
esotericFORTRAN-43909b350b9084ed33f121a15c5770224cbdc79f.zip
Added basic function support
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/example.ft15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/examples/example.ft b/src/examples/example.ft
new file mode 100644
index 0000000..4a4981a
--- /dev/null
+++ b/src/examples/example.ft
@@ -0,0 +1,15 @@
+program example
+int ::test
+int::testtwo
+test=5
+testtwo=7
+int::testthree
+testthree=add(test,testtwo)
+print*,testthree
+end program example
+
+function int add(int a, int b)
+int::value
+value=a+b
+return value
+end \ No newline at end of file