aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.prs
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-10-01 01:04:30 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2026-10-11 00:14:35 +0200
commit4ce39e4fc1de9536de7dedfe91b6dee38dec76ae (patch)
treef9820f96b8eab624430c3700f32a2878a7036ee2 /examples/hello.prs
parent9140988be4e5bb028b7140aca1a67af1370c72a7 (diff)
downloadprc-4ce39e4fc1de9536de7dedfe91b6dee38dec76ae.tar.gz
WIP sym + cgen
Diffstat (limited to 'examples/hello.prs')
-rw-r--r--examples/hello.prs20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/hello.prs b/examples/hello.prs
new file mode 100644
index 0000000..4ba371a
--- /dev/null
+++ b/examples/hello.prs
@@ -0,0 +1,20 @@
+* hello world example
+
+public function main
+ globals
+ myptr pointer to int
+ types
+ socket prototype
+ linkage
+ fd int
+ procedure returning fd
+
+ vfprintf prototype
+ procedure
+
+ myalias alias int
+ procedure
+ display "socket=" socket etc
+ display ", vfprintf=" vfprintf
+ display "this is a string"
+ display cast "this is a string" to pointer to void