diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-05-09 02:56:07 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-09-26 03:41:55 +0200 |
| commit | a3f56c76444fee090e62a59f257ed5f60b4e552b (patch) | |
| tree | 721c82e33078515dae8cbca2ddc0d664d4929c88 /examples/c.prose | |
| download | prc-a3f56c76444fee090e62a59f257ed5f60b4e552b.tar.gz | |
Add project skeleton
Diffstat (limited to 'examples/c.prose')
| -rw-r--r-- | examples/c.prose | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/c.prose b/examples/c.prose new file mode 100644 index 0000000..8224fb5 --- /dev/null +++ b/examples/c.prose @@ -0,0 +1,27 @@ +* C interoperatibility example (without imports) +public function main + types + socket prototype + linkage + domain word + type word + protocol word + fd word + procedure using domain type protocol returning fd + + close prototype + linkage + fd word + status word + procedure using fd returning status + + AF_INET constant to 2 + SOCK_STREAM constant to 2 + linkage + status word + storage + fd word + procedure returning status + call socket using AF_INET SOCK_STREAM 0 returning fd + display "fd is " fd + call close using fd returning status |
